Msg#: 11818 posted 3:45 am on Feb 20, 2006 (gmt 0)
This follows on from a post made by jake66 [webmasterworld.com...] who wanted the address bar url.
I'd like to get the actual url typed in the browser - not the $_SERVER['REQUEST_URI'].
One of my pages is being picked up in google as a duplicate when it is in fact the original. The infringing site is showing 'You searched for these terms' and then shows my page below (highlighing the search terms), requested live from my server. The url indexed by google shows as www.theirsite.com:2007/sthl?st=Weight+Loss+Help&url=http%3A%2F%2Fwww.mysite.com $_SERVER['REQUEST_URI'] returns 'www.mysite.com' and not 'www.theirsite.com'
Msg#: 11818 posted 6:27 am on Feb 20, 2006 (gmt 0)
It is not actually a redirect. I think what is happening is that the site is requesting the current page from my site. It then parses the page adding their table with 'The following search terms have been highlighted: search terms' and adding style="background-color: tags throughout my pages html. It then serves up this page on their site. I want to catch it when they first request the page so they do not get the html to alter. Looking at my server logs it seems that the initial request for index.php does not have a referrer but the requests for the .css and images do.
Msg#: 11818 posted 1:07 am on Feb 21, 2006 (gmt 0)
I initially looked at doing this as the best way to do it but blocking the IP address of their site did not seem to work. After you posted again I took another look at the server logs to see if I had gone wrong somewhere. Turns out the request for the page was not coming from the same IP address of the site but from another one in the same range. Once this was blocked - bingo. Thanks for your help DrDoc.