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 (Forum Locked Forum Locked)
 Helicon Tech : ISAPI_Rewrite 2.x
Subject Topic: 301 redirect
Author
Message |
Bagge
Newbie


Joined: 12 August 2010
Posts: 3
Posted: 12 August 2010 at 4:03am

Hi

All I need is to redirect from domain.com to www.domain.com.
However, I do NOT want to redirect
- sub.domain.com to www.sub.domain.com
- domain to www.domain ('domain' used as intranet address)

The rules will be used for multiple domains, so 'domain.com' could be any domain

Please advice

Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 12 August 2010 at 4:14am

Please try to apply the following:

[ISAPI_Rewrite]
RewriteCond Host: ([^.]+\.com)
RewriteRule (.*) http\://www.$1$2 [RP]

__________________
Regards,
Anton
Back to Top
 
Bagge
Newbie


Joined: 12 August 2010
Posts: 3
Posted: 12 August 2010 at 4:26am

very close.
But what if the domain is not .com?
Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 12 August 2010 at 4:36am

Let's fix it like this then:

[ISAPI_Rewrite]
RewriteCond Host: ([^.]+\.[^.]+)
RewriteRule (.*) http\://www.$1$2 [RP]

__________________
Regards,
Anton
Back to Top
 
Bagge
Newbie


Joined: 12 August 2010
Posts: 3
Posted: 12 August 2010 at 4:46am

Perfect - thank you
Back to Top
 

Sorry, you can NOT post a reply.
This forum has been locked by a forum administrator.

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