'IIS - PHP - Problems to get POST and GET with IIS redirection

I have a little problem with my php website in IIS, i custom the settings of IIS to do personal redirection with my class router.php (i don't use framework). Every 404 request redirect to index.php so i add this rule on my IIS config

I just have a probleme with the $_GET, the fist param of the get take the url of my website when the url path is like https://192.168.56.112/login, i think it's due to the redirect rule,

URL :  https://192.168.56.112/login?test=test&test1=test1
Reponse array(2) { ["404;https://192_168_56_112:443/login?test"]=> string(4) "test" ["test1"]=> string(5) "test1" }

As for $_POST it doesn't work if i don't send my request to the index.php

Thanks for your help



Solution 1:[1]

To resolve my problems I just use

$this->body = $this->fixPOST(file_get_contents('php://input'));

instead of

$_POST

And for the $_GET I removed the url in the first parameter.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Andronicus