2 replies
by jay eckles
Unfortunately, HTTP_REFERER is an optional header for the user agent to send, and at the server you're limited to the information that the client provides in its request. If the agent does't send an HTTP_REFERRER, then there's not much you can do about it.
If you're looking to use the referer to do something like track the path of a user through your site, you could program around the problem using cookies...each page will need to look for cookies and then make a note on the server of the referer, then reset the referer cookie to the current URL. You could do this with a bit of Javascript and a little server-side scripting.
If you're trying to tell what site is linking to yours, you might give out a different link to each search engine, index, etc. that you submit your site to: for example, http://www.jayeckles.com/cgi-bin/enter.cgi?referer=google
Might do nothing more than log the fact that a user came from a link I submitted to Google and then redirect them to the homepage.
I guess your specific needs will determine the workaround you use, if any.
Good luck.
Jay Eckles
www.jayeckles.com
by m_baekdal
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending