Evening,
Can someone help me with the following condition?
RewriteCond %{HTTP_HOST} ^(.*?\.|)(domain1|domain2|domain3)\.(co\.uk|com)$ [NC]
I want to match all subdomains and no-subdomains, a few domains and a few tlds in my rule. The above rule doesn't work though.
Can someone help? Thanks.
开发者_StackOverflowUpdate
RewriteCond %{HTTP_HOST} ^(.*?\.)?(domain1|domain2|domain3)\.(co\.uk|com)$ [NC]
Works. I need a further exception for domain1.co.uk as that is my primary domain. I'm stuck in an infinite loop. Note I still need to rewrite from domain1.com though.
You can have as many RewriteCond
's as you like....
RewriteCond %{HTTP_HOST} ^(.*?\.)?(domain1|domain2|domain3)\.(co\.uk|com)$
RewriteCond %{HTTP_HOST} !^domain1\.co\.uk$
精彩评论