Tell me more ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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.

share|improve this question
Do you have /settings.php file on your server? If yes, then I think I know what's going on. – extesy Jul 23 '12 at 21:26

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.