web2 logo

Artikel Links Notities

HTTP doorsturen naar HTTPS

<?php if (!$_SERVER['HTTPS'] == 'on') { $redirect = 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; header('HTTP/1.1 301 Moved Permanently'); header('Location: ' . $redirect); exit(); } ?>

Via .htaccess (Apache)

RewriteEngine On RewriteCond %{HTTPS} !on RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

naar boven

term zoeken

Notitieruimte