Skip to content

Commit

Permalink
keep path from live_url on redirects
Browse files Browse the repository at this point in the history
  • Loading branch information
mobilejoomla committed Sep 12, 2011
1 parent 953fc19 commit 6b3b0b9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/plugins/domains/domains.php
Expand Up @@ -125,6 +125,18 @@ function getSchemePath(&$http, &$path)
else
$http = 'http';

$mainframe =& JFactory::getApplication();
$live_url = $mainframe->getCfg('live_site');
if($live_url)
{
$parsed = parse_url($live_url);
if($parsed !== false)
{
$path = isset($parsed['path']) ? $parsed['path'] : '/';
return;
}
}

if(strpos(php_sapi_name(), 'cgi') !== false && !empty($_SERVER['REQUEST_URI']) &&
(!ini_get('cgi.fix_pathinfo') || version_compare(PHP_VERSION, '5.2.4', '<')))
$path = rtrim(dirname(str_replace(array('"','<','>',"'"), '', $_SERVER['PHP_SELF'])), '/\\');
Expand Down

0 comments on commit 6b3b0b9

Please sign in to comment.