Re: Retrieve the Http Host from the Http Header

From: Date: Sat, 18 Feb 2006 22:32:14 +0000
Subject: Re: Retrieve the Http Host from the Http Header
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-230705@lists.php.net to get a copy of this message
To know what exactly URL was asked use this: 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'].'?'.$_SERVER['QUERY_STRING'] However when a rewritten URL was used with mod_rewrite Apache module my code above will simply show you the transformed URL. The real requested URL in this situation is located into a different location: $_SERVER['REDIRECT_URL'] Regards, Cristian MARIN ------------------------------------- Developer Designer Division cristic@interaktonline.com http://www.interaktonline.com/ Ministério Público wrote:
I need a way to retrieve the URL typed by anyone visiting the website, so that I can rerout them to the apropriate folder, does anyone know how to do this? I got a message saying that I should use the phpinfo and use the variables that are given as response, but the problem is that the variable that is usefull is the HTTP HEADER HOST and I dont know how to retrieve it. I thank anyone who can help. Rodrigo


« previous php.general (#230705) next »