Question

I recently moved servers from 1and1 to GoDaddy for a client. I noticed their redirect for IE6 users is not working for them any longer. The main webpage loads instead of the redirected page. Please note, the directories are still the same as it was on the previous existing server.

<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>

I'm not sure what I'm doing wrong here but the redirect no longer works.

Thanks in advance for any tips/suggestions.

Was it helpful?

Solution

Those rules look fine, are you sure you are turning on the rewrite engine?

<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>

When I put these rules in a blank htaccess file, IE6 browser gets redirected from URL's like http://localhost/something.html to http://localhost/ie6users/index.php

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top