Filters

The Web Access Management Statistics Report Filters allow your library to categorize and filter different types of HTTP requests in order to configure your statistics to provide you with the results your organization requires.

Whenever a patron attempts to access resources that requires a proxy, your system can generate a request to that resource and compares that request against your Web Access Management Statistics wam_filter file. Upon purchase, Web Access Management includes a default version of this file, but you can customize the file to better meet your needs.

The wam_filter file is a text file that resides in the /http/live directory on your Millennium server (port 80 is your live directory). To edit this file, download it to your local PC using an FTP program such as the one included in the Web Master mode of the Millennium Administration module, then edit it with a text editor of your choice (i.e. Word Pad, Simple Text, etc). After you have made your changes, replace the file using the same FTP method.

Below is an example of a wam_filter file.

#Index Number|Category Name|WAM token(s)|Apply to|Regular Expression
100|images|*|head|image\/.*
#100|X|*|head|image\/.*
101|js script|*|head|application\/x-javascript
102|css*|head|text\/css
103|redirect (302)|*|head|HTTP.*302
104|forbidden (403)|*|head|HTTP.*403
105|page not found (404)|*|head|HTTP.*404
106|bad gateway (502)|*|head|HTTP.*502
107|JSTOR Page View|JSTOR|url|.*\/view\/.*
108|HTML page|*|head|text\/html
109|pdf download|*|head|application\/.*pdf

The elements included in the wam_filter file are in the following pipe-delimited format and are described below. Modify only the elements specified.

Index Number|Category Name|WAM token(s)|Apply to|Regular Expression

Index Number - This is a unique number that identifies the filter category. You can repeat the index number if you want to combine several filters into a single category. The filters do not have to appear in numerical order.

Category Name - This is a custom name to categorize the request. Web Access Management compares each patron request against the wam_filter file and categorizes the request using the Category Name of the first successful match. If you do not want to log any requests matching a particular line in the wam_filter, enter single 'X' into this element.

WAM token(s) - A comma-delimited list of tokens used in the Forward Table. The wam_filter is applied to those databases matching the list of tokens.

Use an asterisk (*) to apply the wam_filter to all resources.

Apply to - There are two choices: url and head and they are described below. This element specifies whether the Regular Expression element should match against either the url or the head.

url-matches against the portion of the URL which follows the host:port.

head-matches against the http header of the response from the server.

Regular Expression - A regular expression is required for the filter to work. When using regular expressions, you must escape characters that are part of regular expression syntax such as '.', '/', or '?'. Standard POSIX regular expressions are supported. Innovative Interfaces does not provide training on regular expressions, however, many libraries find that the regular expressions in the file that comes with WAM suite their needs. However, if you are not familiar with regular expressions, you should read about standard regular expressions before modifying this element.

TIP : You can comment out a line with in the wam_filter file. To do this, start the line with ##. This will comment out the line and the line will be ignored.