From d2516445af7bcbcfe2417223ec6f3ee3f03a0b60 Mon Sep 17 00:00:00 2001 From: Georg Hopp Date: Mon, 8 Oct 2007 10:16:17 +0000 Subject: [PATCH] now the BASEURL can be set for each host the script is running on, making testing much more easy --- config.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/config.php b/config.php index 7bf2a52..85bd5a9 100644 --- a/config.php +++ b/config.php @@ -12,8 +12,19 @@ define ('CACHEDIR', HOME . 'cache/'); define ('LOCALEDIR', HOME . 'locale/'); /* diese Pfade als URLS */ -// Evolver -define ('BASEURL', "http://localhost/~georg/bilder/"); +switch ($_SERVER["HTTP_HOST"]) +{ + // Georgs Testumgebung + case 'georgs_test': + define ('BASEURL', "http://". $_SERVER['SERVER_NAME'] . "/"); + define ('BASESURL', "https://". $_SERVER['SERVER_NAME'] . "/"); + break; + + // Evolver + default: + define ('BASEURL', "http://localhost/~georg/bilder/"); + define ('BASESURL', "https://localhost/~georg/bilder/"); +} define ('IMGURL', BASEURL . 'img/'); define ('LIBURL', BASEURL . 'libs/');