url rewrite help
Igor Sysoev
is at rambler-co.ru
Sat Dec 8 20:45:50 MSK 2007
On Sat, Dec 08, 2007 at 09:31:49AM -0800, rkmr.em at gmail.com wrote:
> i am moving from lighttpd to nginx, and I had this rewrite in lighttd. how
> do i do this in nginx?
>
> "^/[^/]+\.xml$" => "/static$0",
>
> i tried and dint work
> rewrite ^/[^/]+\.xml$ /static$1;
>
> how do i fix this?
You do not need rewrite. Try to avoid a rewrite as much as possible.
location ~ ^/[^/]+\.xml$ {
root /path/to/static;
}
--
Igor Sysoev
http://sysoev.ru/en/
More information about the nginx
mailing list