Corrected base URL algorithm

This commit is contained in:
Markus Koch 2017-05-28 17:58:44 +02:00
parent d0025c613d
commit bc7e8c82cb

View File

@ -1,5 +1,6 @@
<?php <?php
define('PAGE_NAME', '[Simpub CMS]'); // Title of the page define('PAGE_NAME', '[Simpub CMS]'); // Title of the page
define("PAGE_URL", "notsyncing.net"); // Base URL of the page
define('PAGE_AUTHOR', 'Simpub CMS'); // Author of the page (used in footer) define('PAGE_AUTHOR', 'Simpub CMS'); // Author of the page (used in footer)
define('HOME_PAGE', 'blog'); // Entry page (and link for logo) define('HOME_PAGE', 'blog'); // Entry page (and link for logo)
@ -142,7 +143,7 @@
function getServerUrl() { function getServerUrl() {
$temp = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? "https://" : "http://"; $temp = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? "https://" : "http://";
$temp .= $_SERVER['HTTP_HOST']; $temp .= PAGE_URL;
return $temp; return $temp;
} }
?> ?>