[wp-hackers] REQUEST_URI on IIS isn't SCRIPT_NAME
computerguru at neosmart.net
Mon Oct 23 18:11:08 GMT 2006
> I've had success with this:
> $_SERVER['REQUEST_URI'] = ( isset($_SERVER['REQUEST_URI']) ? $_SERVER
> ['REQUEST_URI'] : $_SERVER['SCRIPT_NAME'] . (( isset($_SERVER
> ['QUERY_STRING']) ? '?' . $_SERVER['QUERY_STRING'] : '')));
Thanks for the reply, Alex... But are you sure?
Because REQUEST_URI *is* set on IIS (contrary to what my first post
implied), but it doesn't return the requested URI, rather the actual script
Create an index.php that echos REQUEST_URI and put it in a folder.
Calling that folder: http://mydomain.com/foldername/
on Apache or Lighttpd will echo "/foldername/"
But on IIS it will return "/foldername/index.php"
The code fragment in my last email kinda works, except if you're in the root
dir it gives issues....
Using mod_rewrite for now.. :(
More information about the wp-hackers