Voici le contenue du .htaccess a mettre a la racine du site pour rediriger les pages avec la conservation de l’URL :
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
# First rewrite to HTTPS:
# Don't put blog. here. If it is already there it will be included, if not
# the subsequent rule will catch it.
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Now, rewrite any request to the wrong domain to use blog.
RewriteCond %{HTTP_HOST} !^blog\.
RewriteRule .* https://blog.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>