Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 have some requests like

which I would like to redirect to

I've written

RewriteRule ^[0-9/]+/[0-9]+/[0-9]+/(.*)$$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
up vote 3 down vote accepted

The regular expression may not be correct,

Try with this :

RewriteRule ^[0-9/]+/[0-9]+/[0-9]+/(.*)$1 [L]

Let me know if it works.

share|improve this answer
I tried with that rule, and then I go to 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.