Extract referers from Apache logs

September 28th, 2013 by Richy B. Leave a reply »

This quick awk one-liner (tested on Linux) will extract all referer (referrer) entries from a combined Apache log file (called LOGFILE) excluding entries such as “”, “-“, (empty) and ones containing DOMAIN. Useful if you want to check where external referers are coming from
awk '($11 !~ /^"?-?"?$/ && $11 !~ /DOMAIN/) {print $11}' LOGFILE

This post is over 6 months old.

This means that, despite my best intentions, it may no longer be accurate.

This blog holds over 12 years of archived content - during that time, I may have changed my opinion of something, technology will have advanced (and old "best standards" may no longer be the case), my technology "know how" has improved etc etc - it would probably take me a considerable amount of time to update all the archival entries: and defeat the point of keeping them anyway.

Please take these posts for what they are: a brief look into my past, my history, my journey and "caveat emptor".

Comments are closed.

gamy-dance
%d bloggers like this: