How do you redirect from one directory to another and maintain the proper basepath?
Posted
by
codeninja
on Server Fault
See other posts from Server Fault
or by codeninja
Published on 2010-12-29T18:43:20Z
Indexed on
2010/12/29
18:55 UTC
Read the original article
Hit count: 222
apache
|mod-rewrite
I need to redirect all /eula traffic to /tos
RewriteRule ^/eula/$ /tos [R=301,NC]
but this rule doesnt seem to work -- mostly because the basepath is being treated as the root when really theres another parent directory; what's happening with the above rule is >
/my/docs/eula -> /tos
which is not right, it should be doing this >
/my/docs/eula -> /my/docs/tos
How do I write the rule for this, without having to specify what the parent dir is?
© Server Fault or respective owner