summaryrefslogtreecommitdiffstats
path: root/system/core/Config.php
diff options
context:
space:
mode:
authorPhil Sturgeon <email@philsturgeon.co.uk>2011-01-19 14:46:07 +0100
committerPhil Sturgeon <email@philsturgeon.co.uk>2011-01-19 14:46:07 +0100
commit705a3eec44635f3fada8daa2886d409e6447ca12 (patch)
treecb3adabba41d0cd3bb15aadb7a1e0ddf54c8abe8 /system/core/Config.php
parent0b175df60309f142249266720940fa2b3d7ccad7 (diff)
Avoid double-slashed on the base_url by only slashing index_page if it is actually set.
Diffstat (limited to 'system/core/Config.php')
-rw-r--r--system/core/Config.php3
1 files changed, 2 insertions, 1 deletions
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
{