But there is some problem when someone type in the address bar without https ex: http://www.test.it it show the website correctly but without SSL , i alredy readed all topic talks about this problem, but no one resolve this situation, some codes show me infinite redirect loop others just doesn't work.
Actually my code is:
Code: Select all
RewriteEngine On
RewriteBase /
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteRule ^system/download/(.*) index.php?route=error/not_found [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
Code: Select all
--
RewriteRule ^([^?]*) https://www.yoursite.com/index.php?_route_=$1 [R,L,QSA]
--
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R,QSA]
--
#RewriteCond %{SERVER_PORT} 80
#RewriteRule ^(.*)$ https://www.yoursite.com/$1 [R=301,L]