Skip to content

Commit

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

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

0 comments on commit 458a92a

Please sign in to comment.