Rewrite .htaccess regex url
I have an .htaccess file with this: (I didn't write it)
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?b开发者_StackOverflow中文版la=$1 [L,QSA]
Problem URL http://localhost/index/test The "index" part seems to match "index.php" that's in a web dir and Rewrite fails.
Question: What's wrong and how do I fix it?The enabled option MultiViews could cause this behavior. Try to disable it:
Options -MultiViews
Try with:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.*)$ index.php?bla=$1 [L,QSA]
精彩评论