<font color="#333399"><font>Hello,<br><br>I currently have URI built to have URI like<br><a href="http://website.my/en">website.my/en</a><br>made to send the content from 'website.my' in the en language.<br><br>My Ngingx conf is as follows:<br>
location ~* "^/[a-z]{2}(/.*)?$" {<br> rewrite "^/([a-z]{2})/?$" /index.php?lang=$1 last;<br> rewrite "^/([a-z]{2})(/[^\.]+)$" $2/index.php?lang=$1 last;<br> rewrite "^/([a-z]{2})(/.+)$" $2 last;<br>
}<br><br>I also have some 2-letters top-level directories which I want to send with the highest priority.<br><br>I would like that<br><a href="http://website.my/ab">website.my/ab</a><br>checks if /ab directory (or file) exists and:<br>
- process its content as usual if it's the case<br>- redirects through the language rules if it's not<br><br>Is there a way to make some conditional rewrite based on the try_files directive?<br><br>Thanks,</font></font><br clear="all">
<font size="1"><span style="color:rgb(102,102,102)">---<br></span><b><span style="color:rgb(102,102,102)">B. R.</span></b><span style="color:rgb(102,102,102)"></span></font><br>