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

Popular posts from this blog

HTML/CSS - Automatically set height width from background image? -

php - Mysql Show Process - Sleep Commands and what to do -

c - What is the address of buf (the local variable in the main function)? -