Welcome Guest, Not a member yet? Register   Sign In
system and application folders above the web root
#2

Finally within _parse_request_uri() of CI_URI class, I modified :
PHP Code:
if (isset($_SERVER['SCRIPT_NAME'][0]))
{
    if (
strpos($uri$_SERVER['SCRIPT_NAME']) === 0)
    {
        
$uri = (string) substr($uristrlen($_SERVER['SCRIPT_NAME']));
    }
    elseif (
strpos($uridirname($_SERVER['SCRIPT_NAME'])) === 0)
    {
        
$uri = (string) substr($uristrlen(dirname($_SERVER['SCRIPT_NAME'])));
    }

into:
PHP Code:
$script_name = (string) str_replace($this->config->item('public_folder_name'), ''$_SERVER['SCRIPT_NAME']);
       
if (isset(
$_SERVER['SCRIPT_NAME'][0]))
{
    if (
strpos($uri$script_name) === 0)
    {
        
$uri = (string) substr($uristrlen($script_name));                
    }
    elseif (
strpos($uridirname($script_name)) === 0)
    {
        
$uri = (string) substr($uristrlen(dirname($script_name)));  
    }

and it works even with hmvc installed.
Reply


Messages In This Thread
RE: system and application folders above the web root - by tj_gumis - 04-08-2015, 01:18 PM



Theme © iAndrew 2016 - Forum software by © MyBB