Re: Retrieve the Http Host from the Http Header

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxx
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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux