Jump to content

Recommended Posts

Posted

Hello,

 

I am playing around with my new account, and I've uploaded some HTML to a subirectory:

 

(I'm putting a space before the colons to avoid the URL parsing...)

 

http ://www.****/mysubdir

 

For the time being, I want http ://www.**** to load http ://www.****/mysubdir, so I added a redirect that maps it accordingly...

 

Now when I load www.**** in the browser, after taking a minute or two, it eventually pops up an error page, and as it turns out, it was trying to load:

 

http ://www.****/mysubdirmysubdirmysubdirmysubdirmysubdirmysubdirmysubdirmysubdirmysubdirmysubdirmysub

irmysubdirmysubdir

 

Why is it internally concatenating like that?

 

ps. what's the difference between temporary and permanent redirects, if you can delete either whenever you want anyway?

Posted

Hi JTrey, and welcome to TCH! :(

 

How are you setting up the redirection? I can't tell why that is happening but let me see how you've set it up and perhaps I (or someone else here at the forums) can help.

If not, you can always submit a help desk ticket (link to the help desk is at the top of the forum pages) and the techs will have it solved for you in a minute :)

 

As for the difference between temporary and permanent redirects, here's the explanation, straight from cpanel's documentation:

Temporary - This tells Internet traffic agents (browsers, search engines, etc.) that this is only a temporary redirection, and that they should return to this initial location again in the future for the same page.

Permanent - This tells the Internet traffic agents to go to the redirection address in the future, as the old address will never be used again.

 

You can access the cpanel documentation via the link in your cpanel or directly using an URL such as this one:

http://******:2082/docs/cpanel/index.html

 

Once again, welcome to TCH and your new family. ;)

Posted

Let's pretend the following is the "Add Redirect" page:

 

---------

Add Redirect:

 

http: //domain.com/[___________] >>> http ://[domain.com/subdir]

([ Temporary ]) [Add]

 

...

 

---------

 

That's how I filled out the fields before clicking Add. In fact, I just realized that I can't even load "http://domain.com/subdir" or "http://domain.com/subdir/specificfile.html" or anything else directly from the address bar in my browser anymore until I remove the redirect..

Posted

Because .htaccess works from the top directory down, if it sees anything with mydomain in it, even including /dir/ it'll attempt the redirect and you'll be permanently looped.

 

At least, that is what happened when I tested this with another person having a similar problem.

 

I believe if you do a file redirect (*****/hi.html to *****/dir/) it may work; but I'm not sure. But if you action the entire directory then you are actioning it and everything inside.

 

I think. =)

Posted

Thanks for the insight, which lead to the solution:

 

I simply made www.domain.com/index.html redirect to www.domain.com/subdir (and for the moment just placed a blank index.html there for the sake of it)

 

By doing so, www.domain.com and www.domain.com/index.html in the browser address bar both redirect to www.domain.com/subdir -- success!

 

You thought right :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...