The problems are like
- When I use
http://www.example.com
: It works fine. - When I use
https://www.example.com
: It works fine with my www ssl certificate - When I use
http://example.com
: I lose my styles and icons. - When I use
https://example.com
: I lose my styles and icons.
Now I want it in these ways :
- When I use
http://example.com
: It should redirect tohttps://www.example.com
- When I use
http://www.example.com
: It should redirect tohttps://www.example.com
. - When I use only
example.com
: It should redirect tohttps://www.example.com
Here is my current .htaccess.txt
# SEO URL Settings
RewriteEngine On
# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/
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]
Please direct me how I can achieve what I want and how to fix styles and icons problem. Thanks in Advance !