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

This is a discussion on $_SERVER['REQUEST_URI']', Apache 1.x/2.x IIS 5/6 within the PHP Language forums, part of the PHP Programming Forums category; Hi, When I have a page not found in Apache I can have it redirected to a custom ../error.php ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-25-2005
Simon
 
Posts: n/a
Default $_SERVER['REQUEST_URI']', Apache 1.x/2.x IIS 5/6

Hi,

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
IIS?

What I was thinking of doing is

if $_SERVER['REQUEST_URI'] exists the return it
else
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
$_SERVER[QUERY_STRING'] =
404;http://www.example.com/unknown_page.php?var1=12&var2=14
but it that the case for all of them? shall I return anything after
'404;'?
else
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.

Simon




Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 10:40 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0