Rewrite all urls inside location block in nginx

Hello,

I have a config like
location = /foo.xml { if ($scheme = https) { rewrite .*
http://$http_host/foo.xml
permanent; }}

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?

On Mon, Dec 24, 2012 at 5:01 PM, howard chen [email protected] wrote:

return 301 http://$http_host/foo.xml;

Thanks.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs