<div dir="ltr"><div><div><div><div><span lang="en"><span>hello</span><br><br><span>I have</span> <span>a script that</span> <span>works with</span> <span>apache</span> <span>but I want to</span> <span>migrate</span> <span>to</span> <span>nginx</span><span>, I have</span> <span>this rule</span><span>,</span> <span>but maybe</span> <span>you can</span> <span>do differently</span> <span>optimized</span><span>.<br>
<br></span></span></div><span lang="en"><span>## HTACCESS<br><IfModule mod_rewrite.c><br> RewriteEngine On<br><br>RewriteCond %{REQUEST_FILENAME} !-d<br> RewriteCond %{REQUEST_FILENAME} !-s<br>
RewriteRule ^(.*)$ index.php?url=$1 [QSA,NC,L]<br><br>RewriteCond %{REQUEST_FILENAME} -d<br>RewriteRule ^(.*)$ index.php [QSA,NC,L]<br><br>RewriteCond %{REQUEST_FILENAME} -s<br>RewriteRule ^(.*)$ index.php [QSA,NC,L]<br>
</IfModule><br>
<br></span></span></div><span lang="en"><span>## NGINX<br><br>location / {<br> rewrite ^/(.*)/(.*)$ /$1/index.php?url=$2;<br> }<br><br></span></span></div><span lang="en"><span>Thanks !!<br>
<br></span></span></div><span lang="en"><span>Regards</span></span></div>