Detecting 404 errors after a new site design
Posted
by James Crowley
on ASP.net Weblogs
See other posts from ASP.net Weblogs
or by James Crowley
Published on Fri, 18 Feb 2011 16:47:00 GMT
Indexed on
2011/02/18
23:26 UTC
Read the original article
Hit count: 515
We recently re-designed Developer Fusion and as part of that we needed to ensure that any external links were not broken in the process. In order to monitor this, we used the awesome LogParser tool. All you need to do is open up a command prompt, navigate to the directory with your web site's log files in, and run a query like this:
"c:\program files (x86)\log parser 2.2\logparser" "SELECT top 500 cs-uri-stem,count(*) FROM u_ex*.log WHERE sc-status=404 GROUP BY cs-uri-stem order by count(*) desc" -rtp:-1 > topMissingUrls.txt
And you've got a text file with the top 500 requested URLs that are returning 404. Simple!
© ASP.net Weblogs or respective owner