Forum: NGINX Rewrite all urls inside location block in nginx

Posted by howard chen (Guest)
on 2012-12-24 11:01
(Received via mailing list)
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?
Posted by Edho Arief (Guest)
on 2012-12-24 11:04
(Received via mailing list)
On Mon, Dec 24, 2012 at 5:01 PM, howard chen <howachen@gmail.com> wrote:
>
return 301 http://$http_host/foo.xml;
Posted by howard chen (Guest)
on 2012-12-25 11:56
(Received via mailing list)
Thanks.
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.