From 57b2eaff44a8e2db0b79e5fc5b8c11c5a4816110 Mon Sep 17 00:00:00 2001 From: Kang Cahya Date: Fri, 18 Jun 2021 09:34:23 +0700 Subject: [PATCH] up --- application/config/config.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/application/config/config.php b/application/config/config.php index aea6d2f..dbf47cc 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -24,13 +24,9 @@ | */ // $config['base_url'] = ''; -/* $http = 'http' . ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 's' : '') . '://'; +$http = 'http' . ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 's' : '') . '://'; $newurl = str_replace("index.php","", $_SERVER['SCRIPT_NAME']); -$config['base_url'] = "$http" . $_SERVER['SERVER_NAME'] . "" . $newurl; */ - -$root=(isset($_SERVER['HTTPS']) ? "https://" : "http://").$_SERVER['HTTP_HOST']; -$root.= str_replace(basename($_SERVER['SCRIPT_NAME']), '', $_SERVER['SCRIPT_NAME']); -$config['base_url'] = $root; +$config['base_url'] = "$http" . $_SERVER['SERVER_NAME'] . "" . $newurl; /* |--------------------------------------------------------------------------