apache - Redirect http:// to all pages https:// -


i'd redirect pages http:// https://.

i'm using kohana framework homepage redirects. go example.com/anyoldpage, doesn't redirect http:// if go http://example.com/anyoldpages, if go https://example.com, works.

can please me? rel="canonical" works across website.
example:
if user lands on http://example.com/anyoldpage or http://www.example.com/anyoldpage page rel="canonical" works , presents https:// in seo terms works great. i'm going buying green bar ssl certificate want .htaccess file work.

the current code is.

rewriteengine on rewritecond %{http_host} ^do-main  com [nc] rewriterule (.*) https://www.example.com/$1 [r=301,nc]  rewriteengine on rewritecond %{https} !on rewriterule (.*) https://%{http_host}%{request_uri} 

please , thank :)

you have lines, this:

rewriteengine on rewritecond %{https} !on rewriterule (.*) https://%{http_host}%{request_uri} 

Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -