Fixes for wordpress frontend
This commit is contained in:
parent
e5f42a129e
commit
90aefd81c9
2 changed files with 47 additions and 12 deletions
|
|
@ -16,6 +16,8 @@ class Config {
|
|||
static public $index_file='index.php/';
|
||||
|
||||
static public $get_path_info=false;
|
||||
|
||||
static public $on_other=false;
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -52,7 +54,11 @@ function get_controller($controller, $args=[]) {
|
|||
|
||||
echo 'Page not found';
|
||||
|
||||
http_response_code(404);
|
||||
if(!\PhangoApp\PhaRouter\Config::$on_other) {
|
||||
|
||||
http_response_code(404);
|
||||
|
||||
}
|
||||
|
||||
exit(1);
|
||||
|
||||
|
|
@ -138,8 +144,12 @@ function get_route($path_info) {
|
|||
//If not return, page not found.
|
||||
|
||||
echo 'Page not found';
|
||||
|
||||
http_response_code(404);
|
||||
|
||||
if(!\PhangoApp\PhaRouter\Config::$on_other) {
|
||||
|
||||
http_response_code(404);
|
||||
|
||||
}
|
||||
|
||||
exit(1);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue