J'ai un problème avec mon site opencart lorsque je travaille avec des URL.Comment rediriger tout le www vers une URL non-www et SSL dans Opencart?
The problems are like -
1. When I use http://example.com : It works fine.
2. When I use https://example.com : It works fine with my non-www ssl certificate
3. When I use http://www.example.com : I lose my styles.
4. When I use https://www.example.com : I lose my styles and works as secured page
Now I want it in these ways :
1. When I use http://example.com : It should redirect to https://example.com
2. When I use http://www.example.com : It should redirect to http://example.com so that I can't lose styles.
3. When I use www.example.com : It should redirect to https://example.com
4. When I use only example.com : It should redirect to https://example.com
Voici mon .htaccess.txt actuel
RewriteBase/
RewriteRule ^sitemap.xml$ index.php?route=extension/feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=extension/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]
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} ^(?:www\.)?(.*)$ [NC]
RewriteRule (.*) https://%1%{REQUEST_URI} [L,R=301]
S'il vous plaît me diriger comment je peux obtenir ce que je veux et comment résoudre problème de styles. Merci à l'avance!