2013-02-21 108 views
0

因此,如果我有一個名爲CONTENT的directrory和像localhost/內容 /東西的URL。 MR將URL重寫爲www.localhost/CONTENT /東西。 我不在規則中使用nc標誌,!-f和!-d cond。並沒有影響到這一點(如果他們在評論中也是如此)。 我的.htaccess看起來是這樣的:Mod重寫在localhost上重寫url從小寫到大寫

Options +FollowSymlinks 
RewriteEngine on 

#ignore all real files (php skripts, imgs, styles) 
RewriteCond %{REQUEST_FILENAME} !-f 

#ignore all real directories 
#RewriteCond %{REQUEST_FILENAME} !-d 

RewriteCond %{HTTP_HOST} !^www\. 
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/myCMS/$1 [R=301,L] # localhost 
######RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] # real hosting 

RewriteRule ^(.*)$ index.php?url=$1 [L,QSA] 
#####RewriteRule ^(.*)$ indexTest.php?url=$1 [L,QSA] 

是否有在httpd.conf一些SETING的情況下SENS默認?謝謝你的幫助。

回答

0

因爲我發現原因是Windows不會對目錄名稱進行區分大小寫的比較。因此,如果他應該找到「競爭」並且有名爲「CONTEND」的reall目錄,那麼他將UC目錄名稱用於其他所有內容。