Non www to www

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 1
Joined: 29 Jul 2012, 14:27

Non www to www

29 Jul 2012, 14:29

How can I redirect

http://domain.com/;
http://www.domain.com/index.html;
http://domain.com/index.html

TO http://www.domain.com/ using ISAPI Rewrite?

I have tried examples but didn't work.

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: Non www to www

30 Jul 2012, 06:55

Hello,

The answer would be as in the examples or FAQ section:

Code: Select all
RewriteEngine on
RewriteBase /

RewriteCond %{HTTP:Host} ^domain\.com$ [NC]
RewriteRule ^$ http://www.domain.com/ [NC,R=301,L]

RewriteRule ^index\.html\;?$ http://www.domain.com/ [NC,R=301,L]

Regards
Andrew

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 14 guests