0
htaccess的confilcting規則下面是衝突的規則爲兩個不同的文件
Options +FollowSymLinks
RewriteEngine on
# For www.domain.com it should go to my-index.php page
#
RewriteCond %{HTTP_HOST} ^(www\.)?domain\.com$ [NC]
RewriteRule ^(.*)$ my-index.php [NC,L]
# For Accessing Division Page http://user1.domain.com/news/news-details.php
RewriteCond %{HTTP_HOST} ^(.+)\.domain\.com [NC]
RewriteCond %{HTTP_HOST) !^www\.
RewriteRule ^news/news-details.php$ my-news.php?user=%1 [QSA,NC,L]
# For Page URL http://www.domain.com/news/news-details.php
#
RewriteCond %{REQUEST_URI} ^/news/news\-details\.php [NC]
RewriteCond %{HTTP_HOST} ^www\.domain\.com$ [NC]
RewriteRule ^(.*)$ my-news.php [NC,QSA,L]
# For Accessing Users Page
RewriteCond %{HTTP_HOST} !^www\.domain\.com$ [NC]
RewriteCond %{HTTP_HOST} ^(.*)\.domain\.com$
RewriteRule ^$ /users.php?user=%1 [L]
徵集新聞頁面和索引頁都去索引頁。我不知道爲什麼?
真的 - 你應該顯示你的整個.htaccess內容..不僅僅是它的兩個規則。現在感覺就像一場遊戲:「猜猜看,猜猜爲什麼」。 – LazyOne
我已編輯帖子,現在查看整個文件。 – HardCode
「index page」是指'my-index.php'? – LazyOne