Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.9.3
-
Component/s: Zend_Controller
-
Labels:None
Description
I had to convert a ZF application that sat on a Linux/Apache machine to a Windows 2008/IIS7 machine. Everything seemed to work, with one minor exception. Using the LAMP stack, if the URL had a blank value, such as /index/index/key1//key2// then the PHP variables are blank:
$key1 = $request->getParam ( 'key1' ); //$key1 == '' (blank)
$key2 = $request->getParam ( 'key2' ); //$key2 == '' (blank)
However, since I moved to IIS7, /index/index/key1//key2// gives me the following values:
$key1 = $request->getParam ( 'key1' ); //$key1 == 'key2' (not desired behavior)
$key2 = $request->getParam ( 'key2' ); //$key2 == '' (blank)
I fixed it by overwriting the REQUEST_URI Server in my bootstrap file with the
following code:
if (isset($_SERVER["IIS_WasUrlRewritten"])) {
$_SERVER['REQUEST_URI'] = $_SERVER["UNENCODED_URL"];
}
Please let me know if you would like me to send you my php.ini file or any other IIS related file.
Can you tell me how you have your project setup? Which url rewriter, rules, etc? I have IIS7 installed on vista (should effectively be the same I would think)
Thanks!
Ralph