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!

Logging by Agent/'bot

Status
Not open for further replies.

thedaver

IS-IT--Management
Jul 12, 2001
2,741
US
Is it possible to key on known 'bots, spiders, and IPs to have their web activity logged into file XYZ while "regular" or "unclassified" traffic is routed to file ABC?

I'd rather not post-process my logs to make the separation.

Don't have a problem logging the same content into either log, just want to fork intelligently. Does this require changing the logging agent via a pipe?

Appreciated in advance!


D.E.R. Management - IT Project Management Consulting
 
SetEnvIf User-Agent "botname" is-bot
CustomLog bot_access_log common env=is-bot
CustomLog access_log common env=!is-bot

I don't recall the syntax for the botname. Regex is supported, but I don't know if you have to allow for the entire bot name or if you could just put in "Googlebot
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top