1
這是我目前的.htaccess
數據。如何避免特定目錄的RewriteRule?
# permalinks
RewriteEngine on
# users
RewriteRule ^([a-z0-9_-]{2,15})$ /user.php?username=$1 [QSA,L]
這顯然意味着,
http://testsite.net/asantos
被解析爲:
http://testsite.net/user.php?username=asantos
的網站上也有根的INC目錄,如果我打開這個網址
http://testsite.net/inc/
它實際上重定向到:
http://testsite.net/inc/?username=inc
如何避免現有的是在網站的根目錄,行爲?
我必須每個'RewriteRule'之前指定那些'RewriteCond'條件? – andufo
查看我更新的答案,現在您不需要重複這些跳過規則下的所有規則的這些條件。 – anubhava
再一種情況是,如果我使用testsite.net/inc,它不工作 - 它只有在我使用testsite.net/inc/ – andufo