bcit-ci/CodeIgniter — pull request #3268 by slax0rr (2014-10-07 07:40:20+00:00)
Title: Fix wrongly guessed base_url on some webservers

Some of the webservers report more than they should in
*$_SERVER['SCRIPT_NAME']*, and this messes up the CodeIgniter base_url
guessing. Example, upon visiting http://url.com/Controller/Method, the
reported SCRIPT_NAME is /index.php/Controller/Method, and CI guesses the
base_url as: http://url.com/index.php/Controller, which is wrong. This commit
addresses this issue, and looks for an "index.php" in SCRIPT_NAME, if
found, everything before index.php is part of the base_url, if not
found, the old method is used.