Hello,
Searching for a product in the search machine google can lead the user to a webpage http://www.mywebpage.de/productcalogue_1.html
If the user clicks such a link, he should be directed to the another webpage. I was thinking of using %{HTTP_RERERER} to analyze the referer. Further analyzing the referer, one can find out the exact search word the user entered in google's search mask. ( q=searchword)
I'm having difficulties implementing a redirection using Apaches mod_rewrite. How I can I "grab" %{HTTP_RERERER} , then "remember" that complete string and find out what q= is holding using %{QUERY_STRING}? And finally redirect to a specific page I want.
Or is it not possible to implement the above procedure using mod_rewrite?
Thanks a lot for your time and help!
Apaches mod_rewrite and HTTP_RERERER
Moderator: General Moderators
-
visionmaster
- Forum Contributor
- Posts: 139
- Joined: Wed Jul 14, 2004 4:06 am
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
why not have php handle that? $_SERVER['HTTP_REFERER'], parse_url(), explode() two times.