MAPG-99 use HTTP_HOST instead of SERVER_NAME to prevent wrong redirection
This commit is contained in:
parent
b4de510a65
commit
637ed5d0ac
@ -3,7 +3,7 @@
|
||||
require '../main.php';
|
||||
|
||||
// very basic routing
|
||||
$host = $_SERVER['REQUEST_SCHEME'] . '://' . $_SERVER['SERVER_NAME'];
|
||||
$host = $_SERVER['REQUEST_SCHEME'] . '://' . $_SERVER['HTTP_HOST'];
|
||||
$method = strtolower($_SERVER['REQUEST_METHOD']);
|
||||
$url = substr($_SERVER['REQUEST_URI'], strlen('/'));
|
||||
if (($pos = strpos($url, '?')) !== false) {
|
||||
|
Loading…
Reference in New Issue
Block a user