Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

1 Answer 1

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
add comment

Your Answer

 
discard

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.