# Meilleure solution RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] # BEGIN Force HTTPS RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] # Si www # RewriteCond %{HTTP_HOST} !^www\. [NC] # RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] # END Force HTTPS # BEGIN WordPress RewriteEngine On RewriteBase /perso/ow/ RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /perso/ow/index.php [L] # END WordPress # Marche bien et redirige pas que vers www RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]