Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
Kang Cahya committed Jun 18, 2021
1 parent 458a92a commit 57b2eaf
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions application/config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/*
|--------------------------------------------------------------------------
Expand Down

0 comments on commit 57b2eaf

Please sign in to comment.