.htaccess - Redirecting SSL and Non-SSL to a different domain -
so, use couple brain cells today, life of me cannot figure out why not working
rewritecond %{https} =on [or] rewritecond %{server_port} 443 rewritecond %{http_host} ^domain1.com$ [or] rewritecond %{http_host} ^www.domain1.com$ rewriterule (.*)$ http://www.domain2.com/$1 [r=301,l] rewritecond %{http_host} ^domain1.com$ [or] rewritecond %{http_host} ^www.domain1.com$ rewriterule (.*)$ http://www.domain2.com/$1 [r=301,l]
while non-ssl redirects work fine, ssl redirects nothing...
please help?
you can use 1 rule both http , https/www , non-www
rewritecond %{https} off [or] rewritecond %{https} on rewritecond %{http_host} ^(www\.)?domain1.com$ rewriterule ^(.*)$ http://www.domain2.com/$1 [r=301,l]
Comments
Post a Comment