<div dir="ltr"><div><div><div>Thanks alot Francis Daly :). the try_file option worked for me and location tip also worked but try_file seems more better approach.<br><br></div>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.  <br><br>>location /x { rewrite ^ /x.html redirect; }<br>

>fails because "location /x" will match /x.html, so the second request<br>
>will match the same location as the first one and the same redirect will<br>
>happen again; and one way to avoid the loop is to make the "location"<br>
>only match exactly "/x".<br>

>Based on that, can you guess what the "~" in<br>
<span class="im"><br></span></div><span class="im">can you please explain how the second request creates the loop. if<span></span> i use break instead of redirect?<br><br></span></div><span class="im"></span><div><span class="im"></span></div><br></div>