avec apache
Editer le fichier du site concerné (/etc/apache2/sites-enabled/monsite.conf
) en y ajoutant ces deux lignes après la ligne RewriteEngine on:
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [L,R]
Puis redémarrer le serveur apache avec service apache2 restart
