I can’t understand where the problem is. As suggested by the hosting site i use i have an .htaccess file that allows me to redirect from http to https, and on desktop it seems to work quite well. However on mobile no browser redirects correctly, can someone enlighten me?
This is the content of the htaccess file
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} !on
RewriteCond %{HTTP:X-Forwarded-Proto} !^https$
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</IfModule>
2
Answers
Try these lines of code instead.
This does always work for me.
A solution could be changing your index.html file into and PHP file. By changing the file extension.
Then add the following lines at the top of the file: