2
我的htaccess完全按照我的要求工作,除了它也重定向我的站點地圖文件。有誰知道什麼可以改變或添加,以防止影響任何.xml文件,但繼續工作相同的其他任何東西?停止重定向某些文件類型的htaccess?
RewriteEngine on
RewriteCond %{HTTP_HOST} ^mysite.com$
RewriteRule ^(.*)$ http://www.mysite.com/review/$1 [R=301,L]
Options -MultiViews +FollowSymlinks -Indexes
RewriteEngine on
RewriteRule ^([a-zA-Z0-9\.\-]+)$ review.php?site=$1 [L,QSA]
現在基本上寫它顯示mysite.com/review/review.php?site=$1的內容,當你去mysite.com/review/$1,我希望它繼續這樣的工作,只是不適用於.xml文件。
基本上,如果有人去mysite.com/review/sitemap.xml它應該顯示實際的地圖,不mysite.com/review/review.php?site=sitemap.xml
任何幫助的內容將不勝感激。謝謝!
您是否搜索?嘗試http://stackoverflow.com/questions/1984025/apache-rewrite-rule-to-exclude-an-individual-file-or-type-of-file – Codeguy007
看起來它可以工作,我會怎麼做,爲所有的XML文件,而不是隻是一個特定的,但?我有超過2000個XML文件,所以我無法列出所有在htaccess中的... – user1135462