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: Multipe Domains Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
syoung68
Newbie
Newbie


Joined: 26 July 2010
Online Status: Offline
Posts: 11
Posted: 08 November 2011 at 12:53pm | IP Logged Quote syoung68

I have several domains for a new client and they all need to point to the same one.

Example:
domainA.com
domainA.net
domainA.co

domainB.com
domainB.net
domainB.co

I need all of them, "www" or not, to point to domainA.com

I know I should be able to do this with a single condition, but I ma having problems figuring out the Regex.

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


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10520
Posted: 09 November 2011 at 2:14am | IP Logged Quote Anton

The syntax for ISAPI_Rewrite 2 is:

RewriteCond Host: (?:www\.)?(?:domainA\.net|domainA\.co|domainB\.com|domainB\.net|domainB\.co)
RewriteRule .* http\://domainA.com [RP]

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


Joined: 26 July 2010
Online Status: Offline
Posts: 11
Posted: 09 November 2011 at 6:55am | IP Logged Quote syoung68

Thanks Anton.

Is there no way to use regex to handle the suffix?

in fact the domainas all start the same

firecreekpizza
firecreekpizzaco
firecreekpizzacompany

and then they all have .biz, .co, .com, .net, and .us

No way to make it more concise?

Maybe even with three conditionals?
Back to Top View syoung68's Profile Search for other posts by syoung68
 
Anton
Admin Group
Admin Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10520
Posted: 09 November 2011 at 8:45am | IP Logged Quote Anton

We can try something like this:

RewriteCond Host: (?:www\.)?firecreekpizza.*\.(?:biz|co|com|net|us)
RewriteRule .* http\://domainA.com [RP]

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


Joined: 26 July 2010
Online Status: Offline
Posts: 11
Posted: 09 November 2011 at 9:47am | IP Logged Quote syoung68

That created an error, so I just went with this...

[ISAPI_Rewrite]
RewriteCond Host: www\.firecreekpizza\.com
RewriteRule (.*) http\://firecreekpizza.com$1 [I,RP]

RewriteCond Host: (?:www\.)?firecreekpizza\.(?:biz|co|net|us)
RewriteRule .* http\://firecreekpizza.com [I,RP]

RewriteCond Host: (?:www\.)?firecreekpizzaco\.(?:biz|co|com|net|us)
RewriteRule .* http\://firecreekpizza.com [I,RP]

RewriteCond Host: (?:www\.)?firecreekpizzacompany\.(?:biz|co|com|net|us)
RewriteRule .* http\://firecreekpizza.com [I,RP]


Thanks for the responses.
Back to Top View syoung68's Profile Search for other posts by syoung68
 

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