| Author |
|
syoung68 Newbie

Joined: 26 July 2010
Online Status: Offline Posts: 11
|
| Posted: 08 November 2011 at 12:53pm | IP Logged
|
|
|
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
Online Status: Offline Posts: 10520
|
| Posted: 09 November 2011 at 2:14am | IP Logged
|
|
|
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
Online Status: Offline Posts: 11
|
| Posted: 09 November 2011 at 6:55am | IP Logged
|
|
|
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
Online Status: Offline Posts: 10520
|
| Posted: 09 November 2011 at 8:45am | IP Logged
|
|
|
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
Online Status: Offline Posts: 11
|
| Posted: 09 November 2011 at 9:47am | IP Logged
|
|
|
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 |
|
| |
|
|
If you wish to post a reply to this topic you must first login
If you are not already registered you must first register
|
|
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
|