website usage log
Posted: Mon Mar 13, 2023 12:53 am
Is there a way I can see which useragents visited a given URL? Or, put another way, can I see which URLs were visited by a given useragent?
thanks
RACER
thanks
RACER
You'll need to look at the access logs for your site, as the Webalyzer stats available via Member Tools only give a breakdown of the total number and percentage of requests from a user-agents. If you have shell access enabled on your account, you can do search for a given user agent like so:racerlupine wrote:Is there a way I can see which useragents visited a given URL? Or, put another way, can I see which URLs were visited by a given useragent?
Code: Select all
$ zgrep Firefox /logs/by_user/example.com/access_log*
Code: Select all
1.2.3.4 example.com - [13/Mar/2023:00:41:11 -0700] "GET /wp-login.php HTTP/1.1" 200 2974 "" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/109.0"
Code: Select all
zgrep URL_GOES_HERE /logs/by_user/example.com/access_log* | awk -F\" '{print $6}' | sort | uniq -c | sort -fr