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

I have some requests like


which I would like to redirect to


I've written

RewriteRule ^[0-9/]+/[0-9]+/[0-9]+/(.*)$ http://staging.bobvila.com/blogs/$1 [R,L]

But instead of being redirected to


Its being redirected to


So I don't understand why the redirect rule its eating the "blogs" directory on the redirection to the new server.

share|improve this question

1 Answer 1

up vote 3 down vote accepted

The regular expression may not be correct,

Try with this :

RewriteRule ^[0-9/]+/[0-9]+/[0-9]+/(.*) http://staging.bobvila.com/blogs/$1 [L]

Let me know if it works.

share|improve this answer
I tried with that rule, and then I go to blogs.bobvilapaint.com/07/11/2011/how-to-install-door-hardware but the rule is still eating the "blogs" word :( –  rorra Feb 20 '12 at 18:15
can you paste here the address you are typing on browser, and the address that it should be redirected to ? –  GersonO Feb 20 '12 at 18:24
Please, also ensure that you do not have another .htaccess that could be overriding the current configuration. Maybe you are redirectioning something on the blogs folder, and thats why it gets deleted. –  GersonO Feb 20 '12 at 18:27
You are totally right, the problem was with another redirection rules on the .htaccess Thank you a lot, I spent hours trying to figure out what the problem was :) –  rorra Feb 20 '12 at 18:30

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.