Last active
May 25, 2022 09:04
-
-
Save annelyse/66a5080a7b1bf44cd5f5326da8ed9551 to your computer and use it in GitHub Desktop.
Vérifier s'il ne reste pas des élements non sécurisé sur le site avec : https://ssl-lookup.io/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# BEGIN Redirect HTTP to HTTPS | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{HTTPS} off | |
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L,NE,QSA] | |
</IfModule> | |
# END Redirect HTTP to HTTPS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Begin Really Simple SSL Load balancing fix | |
$server_opts = array("HTTP_CLOUDFRONT_FORWARDED_PROTO" => "https", "HTTP_CF_VISITOR"=>"https", "HTTP_X_FORWARDED_PROTO"=>"https", "HTTP_X_FORWARDED_SSL"=>"on"); | |
foreach( $server_opts as $option => $value ) { | |
if ( (isset($_ENV["HTTPS"]) && ( "on" == $_ENV["HTTPS"] )) || (isset( $_SERVER[ $option ] ) && ( strpos( $_SERVER[ $option ], $value ) !== false )) ) { | |
$_SERVER[ "HTTPS" ] = "on"; | |
break; | |
} | |
} | |
//END Really Simple SSL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment