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 want to rewrite some url's in nginx and I have an wordpress site with URLs like this:

How can is remove the en/ with nginx?

Thanks a lot.


share|improve this question
up vote 1 down vote accepted

You could remove the /en part with the following rewrite.

rewrite ^/en(.*)$ $1;

share|improve this answer
This might be the opposite of what the OP actually wants. I think they want requests to /my-content to actually go to the site at /en/my-content i.e. so the en no longer appears in the URL – nickgrim Sep 3 '12 at 13:16
This snippet doesn`t work on my site. i dont know why. Are there any problems with varnish before the site? – derpiet Sep 3 '12 at 13:23

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.