[英]Rewrite .htaccess regex url
我有一個.htaccess文件,它是:(我沒有寫)
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?bla=$1 [L,QSA]
問題 URL http:// localhost / index / test “索引”部分似乎與Web目錄中的“ index.php”匹配,並且重寫失敗。
問題 :出什么問題了,我該如何解決?
嘗試:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.*)$ index.php?bla=$1 [L,QSA]
啟用的選項MultiViews可能會導致此行為。 嘗試禁用它:
Options -MultiViews
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.