From 6a877e1008d5a67d4c23cf44464b818baf2f3b3b Mon Sep 17 00:00:00 2001 From: Benjamin Sonntag Date: Tue, 16 May 2006 18:08:29 +0000 Subject: [PATCH] Si l'on va vers https://mondomaine.com/admin, force a aller vers https://fqdn/admin/, Closes #526 --- bureau/class/config.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bureau/class/config.php b/bureau/class/config.php index ff2b1894..02def355 100644 --- a/bureau/class/config.php +++ b/bureau/class/config.php @@ -67,7 +67,6 @@ if (ini_get("safe_mode")) { } - /* PHPLIB inclusions : */ $root="/var/alternc/bureau/"; /* Server Domain Name */ @@ -80,6 +79,12 @@ require_once($root."class/db_mysql.php"); require_once($root."class/functions.php"); require_once($root."class/variables.php"); +// Redirection si appel à https://(!fqdn)/ +if ($_SERVER["HTTPS"]=="on" && $host!=$L_FQDN) { + header("Location: https://$L_FQDN/"); +} + + // Classe héritée de la classe db de la phplib. /** * Class for MySQL management in the bureau