|
|
| Author: admin admin Reference Number: AA-00421 Views: 71110 Created: 2015-12-23 10:17 Last Updated: 2025-08-15 10:05 |
0 Rating/ Voters
|
    |
Question : How do I force redirection from http to https on premium or free hosting. Answer : in your sites .htaccess file add the following lines :
RewriteEngine On RewriteCond %{ENV:HTTPS} !on RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
You may use the following lines to force both HTTPS and WWW : RewriteEngine On RewriteCond %{ENV:HTTPS} !on RewriteCond %{HTTP_HOST} !^www.YOURDOMAIN.COM$ [NC] RewriteRule ^(.*)$ https://www.YOURDOMAIN.COM/$1 [L,R=301]
|
| |
| |
| |
|
|
|
|
|