I used this tool and converted my rules to Nginx. However one rule doesn't seem to be working.
My working .htaccess rules are:
RewriteRule ^(.*)\.html $1\.php
RewriteRule ^(.*)/settings\.html$ settings.html?session=$1 [L,NC,QSA]
Here are converted Nginx rules:
rewrite ^/(.*).html /$1.php;
rewrite ^/(.*)/settings.html$ /settings.html?session=$1 last;
Treating .html
as PHP works. However when trying to access settings it is always 404.
If I change the rule to:
rewrite ^/(.*)/settings.(.*)$ /settings.$2?session=$1 last;
It works. What is wrong with .html
as the extension? I have also tried .php
and is still 404.