nginx rewrite question
Posted
by emacsian
on Stack Overflow
See other posts from Stack Overflow
or by emacsian
Published on 2010-04-01T10:10:03Z
Indexed on
2010/04/01
10:13 UTC
Read the original article
Hit count: 127
nginx
I have the following rewrite rule
rewrite ^/ab(.*)/(.*)$ /repo/ab$1/rtest/$2 break;
When the request file is /abname/index.php it gets rewritten to /abname/rtest/index.php
But if the request is of the form /abname/dir1/index.php it gets rewritten as /abname/dir1/rtest/index.php but I would want it to be rewritten as /abname/rtest/dir1/index.php
How do I write the rule ?
© Stack Overflow or respective owner