I am trying to create an htaccess rule to do the following...
Force all http:// and http://www. requests to https://www. - including all subfolders.
So http://example.com redirects to https://www.example.com
and
http://example.com/any-folder redirects to https://www.example.com/any-folder
I am currently using...
But that does not add the www. and subfolder URLs remain at http://
Been searching Google for over an hour looking for something that works, but I have found nothing that works!
Help appreciated.
Force all http:// and http://www. requests to https://www. - including all subfolders.
So http://example.com redirects to https://www.example.com
and
http://example.com/any-folder redirects to https://www.example.com/any-folder
I am currently using...
Code:
<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L]
Been searching Google for over an hour looking for something that works, but I have found nothing that works!
Help appreciated.
Comment