diff --git a/inc/always.php b/inc/always.php index ec84dc08..4225ac4e 100644 --- a/inc/always.php +++ b/inc/always.php @@ -49,7 +49,9 @@ $c->protocol_server_port_script = sprintf( "%s://%s%s%s", (isset($_SERVER['HTTPS ? '' : ':'.$_SERVER['SERVER_PORT'] ), - $_SERVER['SCRIPT_NAME'] ); + ($_SERVER['SCRIPT_NAME'] == '/index.php' ? '' : $_SERVER['SCRIPT_NAME']) ); + +$c->protocol_server_port_script = ($_SERVER['SCRIPT_NAME'] == '/index.php' ? '' : $_SERVER['SCRIPT_NAME']); init_gettext( 'rscds', '../locale' ); diff --git a/inc/always.php.in b/inc/always.php.in index 75d207fd..588a5fa8 100644 --- a/inc/always.php.in +++ b/inc/always.php.in @@ -49,7 +49,9 @@ $c->protocol_server_port_script = sprintf( "%s://%s%s%s", (isset($_SERVER['HTTPS ? '' : ':'.$_SERVER['SERVER_PORT'] ), - $_SERVER['SCRIPT_NAME'] ); + ($_SERVER['SCRIPT_NAME'] == '/index.php' ? '' : $_SERVER['SCRIPT_NAME']) ); + +$c->protocol_server_port_script = ($_SERVER['SCRIPT_NAME'] == '/index.php' ? '' : $_SERVER['SCRIPT_NAME']); init_gettext( 'rscds', '../locale' );