<br><div class="gmail_quote">On Dec 8, 2007 9:45 AM, Igor Sysoev <<a href="mailto:is@rambler-co.ru">is@rambler-co.ru</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="Wj3C7c">On Sat, Dec 08, 2007 at 09:31:49AM -0800, <a href="mailto:rkmr.em@gmail.com">rkmr.em@gmail.com</a> wrote:<br>> i am moving from lighttpd to nginx, and I had this rewrite in lighttd. how
<br>> do i do this in nginx?<br>> "^/[^/]+\.xml$" => "/static$0",<br>> i tried and dint work<br>> rewrite ^/[^/]+\.xml$ /static$1;<br></div></div>You do not need rewrite. Try to avoid a rewrite as much as possible.
<br> location ~ ^/[^/]+\.xml$ {<br> root /path/to/static;<br> }</blockquote><div><br>this has to be in server section right? if i want this common for all virtual hosts, how do i do it?<br></div></div>