I am trying to redirect all traffic to HTTPS and WWW.
Using this in my .htaccess:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
But going to my domain example.com/blog redirects to https://www.example.comblog
This does not have a slash after the domain before the subdirectory.
Any suggestions?
Aucun commentaire:
Enregistrer un commentaire