apache - Set up htaccess redirect to an identically titled directory on a subdomain -
If example.com is my primary domain, how can I redirect 301? I have tried the following but getting a redirect loop error message when trying to go to the page:
RewriteRule ^ holiday $ http://referrals.example.com/holiday/ [L, NC, R = 301]
Thanks!
You need to use RewriteCond
before this rule:
RewriteCond% {HTTP_HOST} ^ (www.) At RewriteEngine? Example \ .com $ [NC] RewriteRule ^ (leave /?) $ Http://referrals.example.com/$1 [L, NC, R = 301]
Comments
Post a Comment