Re: $ SERVER["REQUEST URI"] includes domain unexpectedly

From: Date: Sat, 15 Sep 2007 15:19:43 +0000
Subject: Re: $ SERVER["REQUEST URI"] includes domain unexpectedly
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-262136@lists.php.net to get a copy of this message
On Fri, 14 Sep 2007, junk@realtechtalk.com wrote: > In my old server running Apache 1.3 and PHP 4 this code will return just the > URI as expected: > > $_SERVER["REQUEST_URI"] = "/some-html-file.html" > > In my new server with Apache 2 & PHP 4 this code returns the domain: > > $_SERVER["REQUEST_URI"] = "/full-domain-name.com/some-html-file.html" basename() will assist you in getting the last part of the $_SERVER['REQUEST_URI'] path.. seems like that's what you're after. http://php.net/basename -- Greg Donald Cyberfusion Consulting http://cyberfusionconsulting.com/

« previous php.general (#262136) next »