test
This commit is contained in:
parent
e897de442b
commit
29e4cf7be6
@ -12,6 +12,8 @@ $page_dir = "pages/";
|
|||||||
$dynamic_page_dir = "dynamic/";
|
$dynamic_page_dir = "dynamic/";
|
||||||
|
|
||||||
$subdomain = basename(explode('.', $_SERVER['HTTP_HOST'])[0]);
|
$subdomain = basename(explode('.', $_SERVER['HTTP_HOST'])[0]);
|
||||||
|
$domain = basename(explode('.', $_SERVER['HTTP_HOST'])[1]);
|
||||||
|
$tld = basename(explode('.', $_SERVER['HTTP_HOST'])[2]);
|
||||||
$page_name = basename($_SERVER["QUERY_STRING"]);;
|
$page_name = basename($_SERVER["QUERY_STRING"]);;
|
||||||
|
|
||||||
|
|
||||||
@ -20,7 +22,7 @@ $srvname = $_SERVER["SERVER_NAME"];
|
|||||||
$protocol = $_SERVER['PROTOCOL'] = isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && !empty($_SERVER['HTTP_X_FORWARDED_PROTO']) ? "https://" : "http://";
|
$protocol = $_SERVER['PROTOCOL'] = isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && !empty($_SERVER['HTTP_X_FORWARDED_PROTO']) ? "https://" : "http://";
|
||||||
|
|
||||||
if (empty($page_name)){
|
if (empty($page_name)){
|
||||||
header("Location: $protocol$srvname/$default_page");
|
header("Location: $protocol$domain.$tld/$default_page");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user