Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 1 down vote accepted

RewriteRule ^(.*)/eula$ $1/tos [R=301,NC]

share|improve this answer
i did just that! =/ and it didnt work which is why this is driving me crazy. What about /eula/ its a directory... dunno it looks like it's adding the back slash, so maybe the rule isnt being processed in the right order – qodeninja Dec 29 '10 at 20:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.