Fix wrong base URL generation
Signed-off-by: Ogün Karakuş <kirk5bucuk@gmail.com>
This commit is contained in:
parent
0b30fdc13e
commit
8429c4a363
@ -84,7 +84,7 @@ function get_current_base_url()
|
||||
$url = is_secure_connection() ? 'https://' : 'http://';
|
||||
$url .= $_SERVER['SERVER_NAME'];
|
||||
$url .= $_SERVER['SERVER_PORT'] == 80 || $_SERVER['SERVER_PORT'] == 443 ? '' : ':'.$_SERVER['SERVER_PORT'];
|
||||
$url .= dirname($_SERVER['PHP_SELF']) !== '/' ? dirname($_SERVER['PHP_SELF']).'/' : '/';
|
||||
$url .= str_replace('\\', '/', dirname($_SERVER['PHP_SELF'])) !== '/' ? str_replace('\\', '/', dirname($_SERVER['PHP_SELF'])).'/' : '/';
|
||||
|
||||
return $url;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user