iceman19330
asked on
Rewrite Rule with Multiple Domain Extensions
So I need to redirect 3 domians to 1 domain, the domain itself is the same the domain extension is different.
So how could I condense it so that yourotherdomain.com, .net, .org could all use the same Rewrite Condition rather then having to write that out three times.
So how could I condense it so that yourotherdomain.com, .net, .org could all use the same Rewrite Condition rather then having to write that out three times.
RewriteCond %{HTTP_HOST} ^(www\.)?yourotherdomain.(*) [NC] <<? or is that too simplistic?
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^(.*) http://www.yourdomain.com/$1 [L,R=301]
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
BTW: just noticed; you can drop the second condition which checks for an empty host string, because since the first condition is a positive patch, the host will never be empty when the 2nd condition is being processed.
patch = match