[wp-hackers] REQUEST_URI on IIS isn't SCRIPT_NAME

Computer Guru computerguru at neosmart.net
Mon Oct 23 18:11:08 GMT 2006

> I've had success with this:
> ['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
being run.

Try this:
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.. :(

Computer Guru
NeoSmart Technologies

More information about the wp-hackers mailing list