<br><div class="gmail_quote">On Dec 8, 2007 9:45 AM, Igor Sysoev &lt;<a href="mailto:is@rambler-co.ru">is@rambler-co.ru</a>&gt; 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>&gt; i am moving from lighttpd to nginx, and I had this rewrite in lighttd. how
<br>&gt; do i do this in nginx?<br>&gt; &nbsp; &nbsp;&quot;^/[^/]+\.xml$&quot; =&gt; &quot;/static$0&quot;,<br>&gt; i tried and dint work<br>&gt; &nbsp; rewrite &nbsp; &nbsp;^/[^/]+\.xml$ &nbsp;/static$1;<br></div></div>You do not need rewrite. Try to avoid a rewrite as much as possible.
<br> &nbsp; &nbsp; location ~ ^/[^/]+\.xml$ {<br> &nbsp; &nbsp; &nbsp; &nbsp; root &nbsp; /path/to/static;<br> &nbsp; &nbsp; }</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>