Redirection problem again in new rules.

Muhammad Yousuf Khan sirtcp at gmail.com
Mon Apr 18 13:37:59 UTC 2016


Thanks alot Francis Daly :). the try_file option worked for me and location
tip also worked but try_file seems more better approach.

Btw, can you please explain this paragraph. actually i am really sorry for
this newbie type question. actually i have been working as ssytem admin for
last 5 years. now my Firewall concepts of rules are collapsing with nginx
rules.

>location /x { rewrite ^ /x.html redirect; }
>fails because "location /x" will match /x.html, so the second request
>will match the same location as the first one and the same redirect will
>happen again; and one way to avoid the loop is to make the "location"
>only match exactly "/x".
>Based on that, can you guess what the "~" in

can you please explain how the second request creates the loop. if i use
break instead of redirect?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20160418/726b4ac0/attachment.html>


More information about the nginx mailing list