apache:
版本2.4
規則如下:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?a=$1 [QSA,PT,L]
</IfModule>
情況描述:
訪問
a/b/c.html 實際訪問是 index.php?a=a/b/c.html ---正確
d/b/c.html 實際訪問是 index.php?a=d/b/c.html ---正確
...
只要是index開頭的,就出問題,如
index/b/c.html 實際訪問是 index.php/b/c.html 而我的期望是訪問index.php?a=index/b/c.html ---錯誤
同一個apache環境下,多個專案,都是用同一個偽靜態規則,每個專案的host配置一模一樣,但有的專案不存在問題,有的專案就出現上面那個問題,請教一下各位老鐵,不勝感激!
所有專案的host配置
<VirtualHost *:80>
DocumentRoot "D:/wamp/www/a/"
ServerName a.cn
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "D:/wamp/www/b/"
ServerName b.cn
</VirtualHost>
轉載請註明出處,本文鏈接:https://www.uj5u.com/qianduan/133874.html
標籤:Apache
上一篇:求大佬幫忙整一個,最好有現成的
