From 705a3eec44635f3fada8daa2886d409e6447ca12 Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Wed, 19 Jan 2011 13:46:07 +0000 Subject: Avoid double-slashed on the base_url by only slashing index_page if it is actually set. --- system/core/Config.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'system') diff --git a/system/core/Config.php b/system/core/Config.php index 8ecfba73a..7f501911c 100644 --- a/system/core/Config.php +++ b/system/core/Config.php @@ -229,8 +229,9 @@ class CI_Config { $uri = implode('/', $uri); } + $index = $this->item('index_page') == '' ? '' : $this->slash_item('index_page'); $suffix = ($this->item('url_suffix') == FALSE) ? '' : $this->item('url_suffix'); - return $this->slash_item('base_url').$this->slash_item('index_page').trim($uri, '/').$suffix; + return $this->slash_item('base_url').$index.trim($uri, '/').$suffix; } else { -- cgit v1.2.3-24-g4f1b