Hits by Directory
Do you want to track which directories get the highest traffic in your web site ?
AWStats provides several ways to filter URL’s, but, to filter by directory, you need to add this Extra Section to your AWStats config file (awstats.your-domain-name.conf).
New Report

This AWStats screen has been simulated for better readability.
Extra Section
ExtraSectionName1="Hits by Directory"
ExtraSectionCodeFilter1="200 304"
ExtraSectionCondition1="URL,^.*$"
ExtraSectionFirstColumnTitle1="Directory"
ExtraSectionFirstColumnValues1="URL,^\/([^\/]*)\/"
ExtraSectionFirstColumnFormat1="<A HREF='/%s/' TARGET='_blank'>%.80s</A>"
ExtraSectionStatTypes1=PHB
ExtraSectionAddSumRow1=1
MaxNbOfExtra1=10
MinHitExtra1=1
MaxNbOfExtra1 is the number of lines that will be listed. Use the most convenient value.


February 5th, 2008 at 10:20 pm
will this recognize rewritten url’s or works only for physically present folders?
February 5th, 2008 at 10:29 pm
This extra section works with rewritten URL’s too. “Virtual” folders will appear in the report like “physical” folders do.
Jean-Luc
February 26th, 2008 at 3:50 pm
Hi,
I wonder why “Pages” and “Hits” in ExtraSection are always the same. If “Pages” are just the pure htm-file and “Hits” are the htm-file with its images and so on, these numbers should differ. And when you use the filter from “Pages-URL (Top 10)” you can see, that both numbers must be “Hits”. But in ExtraSection “Pages” make more sense to me. Is this a bug or is there something I do not understand?
Gabi
February 26th, 2008 at 4:08 pm
Hi Gabi,
Pages and hits are not always the same in extra sections.
The regular expressions used in some extra sections exclude files that are not pages. These extra sections will show the same numbers for pages and hits. In this case, you should use :
ExtraSectionStatTypes1=PBOther extra sections show different numbers for pages and hits. In the example above, you see that the first directories only include pages and that the last one contains images and no page.