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: Multipe Domains
Author
Message |
syoung68
Newbie


Joined: 26 July 2010
Posts: 11
Posted: 08 November 2011 at 12:53pm

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
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 09 November 2011 at 2:14am

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
 
syoung68
Newbie


Joined: 26 July 2010
Posts: 11
Posted: 09 November 2011 at 6:55am

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
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 09 November 2011 at 8:45am

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
 
syoung68
Newbie


Joined: 26 July 2010
Posts: 11
Posted: 09 November 2011 at 9:47am

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
 

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