RonPK

msg:595179 | 2:06 pm on Jun 8, 2005 (gmt 0) |
Sounds like an infinite loop. Are you sure that the target of the redirect doesn't point to itself?
|
jdMorgan

msg:595180 | 2:21 pm on Jun 8, 2005 (gmt 0) |
To expand on the previous post, because it is unconditional, your Redirect will also be invoked for the redirected request, leading to a loop: 1st request: /somefile -> redirects to /folder/somefile 2nd request: /folder/somefile -> redirects to /folder/folder/somefile 3rd request: /folder/folder/somefile -> redirects to /folder/folder/folder/somefile etc. This continues until the maximum redirection limit for either the browser or the server is reached, whichever is lower. If you have sufficient permissions from your host to use mod_rewrite [httpd.apache.org] in .htaccess, then you can test the requested folder, and only redirect if "/folder" is not present in the request. This will prevent the looping. Something like:
Options +FollowSymLinks RewriteEngine on RewriteCond $1 !^folder/ RewriteRule (.*) /folder/$1 [L]
This code also generates a server-internal rewrite rather than an external redirect, hiding the location change from users and robots. Jim
|
superbird

msg:595181 | 2:26 pm on Jun 8, 2005 (gmt 0) |
OK, that sounds likely, because I don't know what I'm doing with this stuff yet. I'll probably draw myself a diagram to make it clearer. Thanks guys!
|
superbird

msg:595182 | 3:07 pm on Jun 9, 2005 (gmt 0) |
I still don't know what I'm doing with this :( I've got sub.mydomain.com which I want to go to sub.mydomain.com/dir/ The host lets me do mod_rewrite but I've only ever used it with the automatic thing in WordPress, so if I try that it'll probably mess up as well
|
|