Hello,
I have some problems with redirecting http to https. If I write https:// example.com in the browser address bar it works just fine. However, if I type http:// example.com it does not redirect me to https, but it shows me the server default page.
My .htaccess file contains the following code:
I, obviously, changed example. com to my domain name.
Rewrite is enabled in OLS:
Any suggestions?
I have some problems with redirecting http to https. If I write https:// example.com in the browser address bar it works just fine. However, if I type http:// example.com it does not redirect me to https, but it shows me the server default page.
My .htaccess file contains the following code:
Code:
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://example.com/$1 [R,L]
Rewrite is enabled in OLS:
Any suggestions?
Last edited: