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

AWStats, hits by directory
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.

4 Responses to “Hits by Directory”

  1. Jebamani says:

    will this recognize rewritten url’s or works only for physically present folders?

  2. Jean-Luc says:

    This extra section works with rewritten URL’s too. “Virtual” folders will appear in the report like “physical” folders do.

    Jean-Luc

  3. Gabi says:

    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

  4. Jean-Luc says:

    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=PB

    Other 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.


 

Leave a Reply