Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set logfile to record search engine referrers etc.

Status
Not open for further replies.

SM777

Technical User
Mar 7, 2001
208
GB
I'm getting a lot of 404's since I reorganised my directory structure. I'm guessing that search engines have cached the old pages so that when a punter searches and find my site the page has moved.

How do I get the access log to record the search engine referred from?

All I see at the moment is the client ip address and the page they are trying to find.
 
Hi,

You can just create an additional log :

LogFormat "%{Referer}i -> %U" referer
CustomLog logs/referer_log referer

Or, if you prefer, use the 'LogFormat' directive to change the standard log output.

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
CustomLog logs/access_log combined


That might cause problems with log analysers, however.

Hope this helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top