09-09-2016, 06:44 AM
Looking at the code starting at line 25 on (included in every US page) we have this:
Here is the definition, roughly, of (I've simplified it for brevity):
So if there is a page existing in then this redirection will happen automatically and it will happen to an absolute path so that there is no ambiguity about that. Choosing a consistent way to specify Redirect:too() arguments will not harm the ability to override pages with .
Where I sometimes have questions is with the scripts that are require_once'd (i.e., not a "page" per-se). It appears that these are require_once'd from init.php with an absolute path and no use of include_path or anything. I *think* this means that cannot be used to "override" scripts which are include'd or require'd. But that's a totally different question, unrelated to the Redirect.php class.
Code:
header.phpCode:
//check for a custom pageCode:
$currentPage = currentPage();Code:
if(file_exists($abs_us_root.$us_url_root.'usersc/'.$currentPage)){Code:
if(currentFolder()!= 'usersc'){Code:
Redirect::to($us_url_root.'usersc/'.$currentPage);Code:
}Code:
}Here is the definition, roughly, of
Code:
currentPage()Code:
return(basename($_SERVER['PHP_SELF']));So if there is a page existing in
Code:
usersc/Code:
usersc/Where I sometimes have questions is with the scripts that are require_once'd (i.e., not a "page" per-se). It appears that these are require_once'd from init.php with an absolute path and no use of include_path or anything. I *think* this means that
Code:
usersc/