问题
I have basic htaccess file:
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ rewrite.php?data=$1 [L,QSA]
It works as expected for the most part. What doesn't work as I would like it to is this:
I have this link that doesn't rewrite as per the rule:
http://domain.com/movies.php
But also these url's are not rewritten either:
http://domain.com/movies http://domain.com/movies/ http://domain.com/movies/fdgdgdgdg
Is this normal behaviour? How can I fix this so that the only working url would end with movies.php
回答1:
I think this is a multiviews problem. Disable multiviews with
Options -MultiViews
来源:https://stackoverflow.com/questions/14131216/apaches-rewrite-condition-not-file-f-behaviour