.htaccess - <http:// to http://www.> and <https:// to https://www.> -
there not say, because wanna try explain easy.
is there way create .htaccess these things:
example.com > http://www. example.com
http:// example.com > http:// www. example.com
https:// example.com > https:// www. example.com
what mean like:
- if http, goes
http + www - if https goes
https + www - if nothing in front of domain, goes
http + www
i've tried make work code:
rewritecond %{http_host} ^[^.]+\.[^.]+$ rewriterule ^(.*) http://www.%{http_host}/$1 [r=301] that code works, thing wrong it, when https:// example.com redirects http:// www. example.com
if doesn't work, can write separate rule https , http:
rewritecond %{https} !on rewritecond %{http_host} !^www\. [nc] rewriterule ^(.*)$ http://www.xplayrs.com/$1 [l] rewritecond %{https} on rewritecond %{http_host} !^www\. [nc] rewriterule ^(.*)$ https://www.xplayrs.com/$1 [l]
Comments
Post a Comment