diff options
author | jan <jan@jandecaluwe.com> | 2005-10-18 11:38:44 +0200 |
---|---|---|
committer | jan <jan@jandecaluwe.com> | 2005-10-18 11:38:44 +0200 |
commit | 81124000ddd28d1b4c8c39847dfe27783342ea75 (patch) | |
tree | 256f4842b0a5fa10c805fcd310c58b57e54656fb | |
parent | 39e6decfeeb5519a78c960fd57d373496671a24b (diff) | |
download | rpg-81124000ddd28d1b4c8c39847dfe27783342ea75.tar.gz rpg-81124000ddd28d1b4c8c39847dfe27783342ea75.tar.bz2 |
fix script url for basedir and urlrewrite
darcs-hash:20051018093844-45605-3e2e726159a92f328a5ea61d295bf7d42a3e7e2e.gz
-rw-r--r-- | inc/pageutils.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/inc/pageutils.php b/inc/pageutils.php index 25ba01684..bf629c097 100644 --- a/inc/pageutils.php +++ b/inc/pageutils.php @@ -30,7 +30,11 @@ function getID($param='id'){ if(empty($id) && $conf['userewrite'] == 2){ //get the script URL if($conf['basedir']){ - $script = $conf['basedir'].basename($_SERVER['SCRIPT_FILENAME']); + $relpath = ''; + if($param != 'id') { + $relpath = 'lib/exe/'; + } + $script = $conf['basedir'].$relpath.basename($_SERVER['SCRIPT_FILENAME']); }elseif($_SERVER['DOCUMENT_ROOT'] && $_SERVER['SCRIPT_FILENAME']){ $script = preg_replace ('/^'.preg_quote($_SERVER['DOCUMENT_ROOT'],'/').'/','', $_SERVER['SCRIPT_FILENAME']); |