Re: Best way to deal with $_SERVER['REQUEST_URI'] on IIS?

From: Date: Tue, 21 Apr 2009 20:15:01 +0000
Subject: Re: Best way to deal with $_SERVER['REQUEST_URI'] on IIS?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-291773@lists.php.net to get a copy of this message
On Tue, Apr 21, 2009 at 4:04 PM, Mattias Thorslund <mattias@thorslund.us> wrote: > Hi all, > > Apparently, $_SERVER['REQUEST_URI'] doesn't get set the same way when > running PHP on IIS as when running it on Apache. Specifically, it seems to > contain the script name only, and not the query string part. > > I know I can rewrite my code to piece together a $_SERVER['REQUEST_URI'] > from $_SERVER['SCRIPT_NAME'] and $_SERVER['QUERY_STRING'], but some > instances of $_SERVER['REQUEST_URI'] are in third party scripts which would > be a bit of a pain to fix every time they are updated. > > It is a known problem since there are several mentions and workarounds to be > found on the Internet, but I'm wondering which is currently the "best" way > to deal with it. I don't personally run PHP with IIS, so I haven't > encountered this problem before...but now I have a user who does. I could > potentially have more users who encounter the same thing, so the easier the > instructions and the less tinkering, the better. Is there a php.ini setting, > for instance? What have you found that works for you? > > Thanks, > > Mattias It works just fine on the servers where I work. Andrew

« previous php.general (#291773) next »