Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have the following rule in my .htaccess file:

RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
RewriteRule ^(.*)$$1 [L,R=301]

I want to redirect requests to the www version of my site. It doesn't work when I tried on Internet Explorer 6...haven't tried on other versions of i.e. It works for chrome and firefox.

Any ideas why this could happen and how to solve? Thanks much

share|improve this question
IE should not recognise .htaccess rules, Apache should. Maybe IE6 does not know how to do Location: redirects. What did you get? A blank page? – Lekensteyn Mar 23 '11 at 18:49
First I see a flash in the location bar: http ://, then it just goes to google search result page with as the query – berto77 Mar 23 '11 at 18:51
You may also want to turn on the mod_rewrite log to get an idea of what mod_rewrite is doing. – Andrew M. Mar 23 '11 at 18:53
Ok...good idea Red – berto77 Mar 23 '11 at 18:55
Unfortunately, I didn't set up any rewriteLog – berto77 Mar 23 '11 at 18:56

Looks like a DNS problem, newer browsers automatically try if fails, but IE immediately redirects to the search engine.

You need to set an A record for www., pointing to your servers IP address.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.