Skip to content

Commit

Permalink
try to improve automatic path detection
Browse files Browse the repository at this point in the history
git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@1600 f5dc347c-c33d-0410-90a0-b07cc1902cb9
  • Loading branch information
Julian Fitzell committed Oct 29, 2002
1 parent 900ad91 commit 9393f35
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion config_defaults_inc.php
Expand Up @@ -42,7 +42,18 @@
# path to your installation as seen from the web browser
# requires trailing /
if ( isset( $_SERVER['SERVER_NAME'] ) && isset ( $_SERVER['PHP_SELF'] ) ) {
$g_path = 'http://' . $_SERVER['SERVER_NAME'] . dirname( $_SERVER['PHP_SELF'] ) . '/';
$t_host = $_SERVER['SERVER_NAME'];
$t_port = ':' . $_SERVER['SERVER_PORT'];
if ( ':80' == $t_port ) {
$t_port = '';
}

$t_path = dirname( $_SERVER['PHP_SELF'] );
if ( '/' == $t_path || '\\' == $t_path ) {
$t_path = '';
}

$g_path = 'http://' . $t_host . $t_port . $t_path . '/';
} else {
$g_path = 'http://yourhostnamehere/mantis/';
}
Expand Down

0 comments on commit 9393f35

Please sign in to comment.