By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,212 Members | 1,210 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,212 IT Pros & Developers. It's quick & easy.

$_SERVER['REQUEST_URI']', Apache 1.x/2.x IIS 5/6

P: n/a

When I have a page not found in Apache I can have it redirected to a custom
../error.php file and I can use $_SERVER['REQUEST_URI'] to get the file that
was not found.

But as some of you might know, IIS does not have '$_SERVER['REQUEST_URI']'.

So what is a 100% secure way of finding the path of the requested uri using

What I was thinking of doing is

if $_SERVER['REQUEST_URI'] exists the return it
if $_SERVER[QUERY_STRING'] exists strip the relevant info from it and return
the data
but how do I know for certain what the format will be? in my case,
(IIS6) I get
but it that the case for all of them? shall I return anything after
return self?

I obviously did a search on google, but most example/work around just don't
work or don't achieve the expected result.

Many thanks.


Jul 17 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.