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: domain.com equals to www.domain.com Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
Seik
Newbie
Newbie


Joined: 04 March 2011
Online Status: Offline
Posts: 8
Posted: 23 March 2011 at 5:40pm | IP Logged Quote Seik

Hello
What rule I should add to that a URL type domain.com is the same as www.domain.com?

Thanks for the help
Back to Top View Seik's Profile Search for other posts by Seik
 
Anton
Admin Group
Admin Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10520
Posted: 24 March 2011 at 3:51am | IP Logged Quote Anton

In ISAPI_Rewrite 2 is should be:

[ISAPI_Rewrite]

RewriteCond Host: domain\.com
RewriteRule (.*) http\://www.domain.com$1 [RP]

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


Joined: 04 March 2011
Online Status: Offline
Posts: 8
Posted: 24 March 2011 at 7:27am | IP Logged Quote Seik

Can be rule general for multiple domains?, Or should include a rule for everyone domain?

Thanks for your response

Back to Top View Seik's Profile Search for other posts by Seik
 
Anton
Admin Group
Admin Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10520
Posted: 25 March 2011 at 3:14am | IP Logged Quote Anton

If you want the rule to work for all domains on the server, simply put this into the global httpd.ini in ISAPI_Rewrite install dir:

[ISAPI_Rewrite]

RewriteCond Host: (?!www\..*)(.*\.com)
RewriteRule (.*) http\://www.$1$2 [RP]

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


Joined: 04 March 2011
Online Status: Offline
Posts: 8
Posted: 28 March 2011 at 1:52am | IP Logged Quote Seik

Rule works perfectly, but what modification should I add for work with any domain extension(.com, .es, .org, .net, etc...)?

Thank you again
Back to Top View Seik's Profile Search for other posts by Seik
 
Anton
Admin Group
Admin Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10520
Posted: 28 March 2011 at 2:51am | IP Logged Quote Anton

Please try to have it as follows:

[ISAPI_Rewrite]

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

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


Joined: 04 March 2011
Online Status: Offline
Posts: 8
Posted: 28 March 2011 at 10:43am | IP Logged Quote Seik

Perfect ¡¡¡ Works perfectly. Thank you very much ¡¡
Back to Top View Seik's Profile Search for other posts by Seik
 

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