Welcome! Log In Create A New Profile

Advanced

Rewrite all urls inside location block in nginx

howard chen
December 24, 2012 05:02AM
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?
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Rewrite all urls inside location block in nginx

howard chen December 24, 2012 05:02AM

Re: Rewrite all urls inside location block in nginx

Edho Arief December 24, 2012 05:04AM

Re: Rewrite all urls inside location block in nginx

howard chen December 25, 2012 05:56AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 261
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready