Hello,<div><br></div><div><font face="Arial, Liberation Sans, DejaVu Sans, sans-serif"><span style="line-height:12px">I have a config like</span></font><table style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:rgb(255,255,255);border-collapse:collapse;border-spacing:0px;text-align:left">
</table><font face="Arial, Liberation Sans, DejaVu Sans, sans-serif"><span style="line-height:12px"><br></span></font><table style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:rgb(255,255,255);border-collapse:collapse;border-spacing:0px;text-align:left">
</table><font face="Arial, Liberation Sans, DejaVu Sans, sans-serif"><span style="line-height:12px">location = /foo.xml {</span></font><table style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:rgb(255,255,255);border-collapse:collapse;border-spacing:0px;text-align:left">
</table><font face="Arial, Liberation Sans, DejaVu Sans, sans-serif"><span style="line-height:12px"> if ($scheme = https) {</span></font><table style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:rgb(255,255,255);border-collapse:collapse;border-spacing:0px;text-align:left">
</table><font face="Arial, Liberation Sans, DejaVu Sans, sans-serif"><span style="line-height:12px"> rewrite .* http://$http_host/foo.xml permanent;</span></font><table style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:rgb(255,255,255);border-collapse:collapse;border-spacing:0px;text-align:left">
</table><font face="Arial, Liberation Sans, DejaVu Sans, sans-serif"><span style="line-height:12px"> }</span></font><table style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:rgb(255,255,255);border-collapse:collapse;border-spacing:0px;text-align:left">
</table><font face="Arial, Liberation Sans, DejaVu Sans, sans-serif"><span style="line-height:12px">}</span></font><table style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:rgb(255,255,255);border-collapse:collapse;border-spacing:0px;text-align:left">
</table><table style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:rgb(255,255,255);border-collapse:collapse;border-spacing:0px;text-align:left"></table><div><font face="Arial, Liberation Sans, DejaVu Sans, sans-serif"><span style="line-height:12px"><br>
</span></font>But as you can see, the file is already matched with the location block, it seems to me the regex rewrite is wasting the CPU cycle, are there any better way to do it?</div></div>