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