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

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -