2012-07-31 77 views
1

我最近將客戶端的服務器從1and1移至GoDaddy。我注意到他們的IE6用戶重定向不再爲他們工作。主網頁加載而不是重定向頁面。請注意,這些目錄仍然與先前的現有服務器上的目錄相同。.htaccess針對IE6的瀏覽器重定向

<IfModule mod_rewrite.c> 
    # redirect IE 5 or 6 requests to version-specific subdomains 
    RewriteCond %{HTTP_USER_AGENT} MSIE\ ([56])\. 
    RewriteRule ^([a-z]+)\.html$ /ie6users/index.php [R=302,L] 
</IfModule> 

我不知道我在做什麼錯,但重定向不再有效。

在此先感謝您的任何提示/建議。

回答

1

這些規則看起來不錯,你確定你正在打開重寫引擎嗎?

<IfModule mod_rewrite.c> 

    RewriteEngine On 

    # redirect IE 5 or 6 requests to version-specific subdomains 
    RewriteCond %{HTTP_USER_AGENT} MSIE\ ([56])\. 
    RewriteRule ^([a-z]+)\.html$ /ie6users/index.php [R=302,L] 
</IfModule> 

當我把這些規則中的空白htaccess文件,IE6瀏覽器會從URL的喜歡http://localhost/something.html重定向到http://localhost/ie6users/index.php

+0

我有我的.htacess文件確切的代碼,並沒有進行重定向。我很難過。 – 2012-07-31 18:21:24

+0

我只是通過添加完整的url而得到它的工作。感謝您的輸入。 – 2012-07-31 18:33:13