add option to force a specific base url
This commit is contained in:
parent
17696f842c
commit
c14a36079c
2 changed files with 6 additions and 2 deletions
|
@ -39,7 +39,8 @@ _d("WH_SPLITS", 1); // int how many levels of subfolders to put in
|
||||||
_d("VERSION", '2.5.5+'); // string shimmie version
|
_d("VERSION", '2.5.5+'); // string shimmie version
|
||||||
_d("TIMEZONE", null); // string timezone
|
_d("TIMEZONE", null); // string timezone
|
||||||
_d("CORE_EXTS", "bbcode,user,mail,upload,image,view,handle_pixel,ext_manager,setup,upgrade,handle_404,comment,tag_list,index,tag_edit,alias_editor"); // extensions to always enable
|
_d("CORE_EXTS", "bbcode,user,mail,upload,image,view,handle_pixel,ext_manager,setup,upgrade,handle_404,comment,tag_list,index,tag_edit,alias_editor"); // extensions to always enable
|
||||||
_d("EXTRA_EXTS", ""); // optional extra extensions
|
_d("EXTRA_EXTS", ""); // string optional extra extensions
|
||||||
|
_d("BASE_URL", null); // string force a specific base URL (default is auto-detect)
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -444,7 +444,10 @@ function make_link($page=null, $query=null) {
|
||||||
|
|
||||||
if(is_null($page)) $page = $config->get_string('main_page');
|
if(is_null($page)) $page = $config->get_string('main_page');
|
||||||
|
|
||||||
if(NICE_URLS || $config->get_bool('nice_urls', false)) {
|
if(!is_null(BASE_URL)) {
|
||||||
|
$base = BASE_URL;
|
||||||
|
}
|
||||||
|
elseif(NICE_URLS || $config->get_bool('nice_urls', false)) {
|
||||||
$base = str_replace('/'.basename($_SERVER["SCRIPT_FILENAME"]), "", $_SERVER["PHP_SELF"]);
|
$base = str_replace('/'.basename($_SERVER["SCRIPT_FILENAME"]), "", $_SERVER["PHP_SELF"]);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Reference in a new issue