Notebook

Pense bête

Notebook
Programmation

Apache

Rediriger http vers https avec .htaccess

Source : https://wiki.apache.org/httpd/RewriteHTTPToHTTPS

##Redirige http vers https
RewriteEngine On
# This will enable the Rewrite capabilities

RewriteCond %{HTTPS} !=on
# This checks to make sure the connection is not already HTTPS

RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
# This rule will redirect users from their original location, to the same location but using HTTPS.

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *