HowTo ignore some files/folders from awstats reports

Awstats will consider as a page hit any entry from the log it processes. By default some file extensions (for regular image types and css/js) are excluded from what awstats will consider as a page:

NotPageList="css js class gif jpg jpeg png bmp ico"

(this is the default). All other file types will be counted as pages. Now, if we want to completely ignore some files, or even all the content of one folder from the awstats processing we can use the SkipFiles parameter. We might want to do this to ignore some frames, hidden pages, ajax calls, etc.

The SkipFiles parameter is by default empty, and in order to use it we have to add the appropriate config in our awstats.conf file.  For example to ignore a file called somefile.php we will add "/somefile.php":


while if we want to ignore all the pages in a folder called _somefolder _we will have to use a regex value like: “REGEX[^/somefolder]" We can add several rules separated by spaces:

SkipFiles="/somefile.php REGEX[^\/somefolder]"

Note: this will be effective only for new updates; meaning existing data will not be affected by this (if really needed you will have to regenerate your stats to get rid of those pages in old stats).

comments powered by Disqus