note 108186 deleted from reserved.variables.server by cmb
| From: | cmb@php.net | Date: | Sun, 24 Mar 2019 11:19:56 +0000 |
| Subject: | note 108186 deleted from reserved.variables.server by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-210438@lists.php.net to get a copy of this message | ||
Note Submitter: LOL
----
For an hosting that use windows I have used this script to make REQUEST_URI to be correctly setted
on IIS
<?php
function request_URI() {
if(!isset($_SERVER['REQUEST_URI'])) {
$_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'];
if($_SERVER['QUERY_STRING']) {
$_SERVER['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING'];
}
}
return $_SERVER['REQUEST_URI'];
}
$_SERVER['REQUEST_URI'] = request_URI();
?>