I’d like my site to be accessible by the following two urls only:
http://domain.com
http://origin.domain.com
But the following rewrite rule gets into an infinite loop:
RewriteCond %{HTTP_HOST} !^(origin)\.domain\.com [NC]
RewriteRule (.*) http://domain.com$1 [R=301,L]
What am I doing wrong? Any help would be greatly appreciated!
Change the first line to