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

I am trying to create a rewrite rule for ngnix to redirect everything request that starts with: /node (i.e to

Could anyone show me how to accomplish that ?

Many thanks

share|improve this question

2 Answers 2

up vote 1 down vote accepted

It is achieved with locations like this:

server {
    location ^~ /node/ {
        rewrite ^\/node\/(.*)$$1 break;

See nginx documentation for details.

share|improve this answer
Thank you both, that did the trick! –  silkAdmin Mar 19 '12 at 20:34

Does this work?

location /node {
  rewrite /node/(.*)$1 ;
share|improve this answer

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.