2010-10-21 85 views
0

我現在使用:htaccess的重寫

RewriteEngine on 
RewriteRule !^index.html http://samedomain.com [L,R=301] 

,使所有查詢去http://samedomain.com ...(usualy它將裝載的index.html) 中的index.html被排除在外,因此不會來了無盡循環。

我可以打開http://samedomain.com/index.html FINE ..它不會重定向。 對子頁面的其他請求會重定向到http://samedomain.com 但是它不會打開頁面。

將是巨大的,你能告訴我如何將所有請求重定向到 http://samedomain.com以及如何排除2個文件(index.html,然後一個image.jpg文件) 從重新路由排除。

THX 克里斯

+1

這是服務器故障問題。 – 2010-10-21 10:24:05

回答

0
RewriteCond %{REQUEST_URI} !^/?index\.html$ 
RewriteCond %{REQUEST_URI} !^/?image\.jpg$ 
RewriteRule /?(.*) http://samedomain.com/$1 [L]