This forum has been moved here:
Helicon Tech Community Forum

  Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 2.x
 Helicon Tech : ISAPI_Rewrite 2.x
Subject Topic: Redirect all websites on IIS from non www Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
bhavikap
Newbie
Newbie


Joined: 04 July 2011
Online Status: Offline
Posts: 1
Posted: 04 July 2011 at 7:36pm | IP Logged Quote bhavikap

Redirect all websites on IIS from non www to www url. Also not to redirect subdomains such as http://subdomain.example.com.

I have written the below in htaccess file, but is does not seem to work.

Also, there are other rules to be applied after the non www to www. For example http://www.example.com/browser.asp?Content=xyz to http://www.example.com/xyz/

RewriteCond %{HTTPS} (on)?
RewriteCond %{HTTP:Host} ^(?!www\.)(.+)$
RewriteCond %{REQUEST_URI} (.+)
RewriteRule .? http(?%1s)://www.%2%3 [I,RP]
Back to Top View bhavikap's Profile Search for other posts by bhavikap
 
Anton
Admin Group
Admin Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10520
Posted: 05 July 2011 at 2:52am | IP Logged Quote Anton

Could you please specify the version of ISAPI_Rewrite you are using - 2 or 3.
The code above is for v3 but the post is in v2 forum...

__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum