excluding requests by URL pattern
Roy T. Fielding (fielding@kiwi.ICS.UCI.EDU)
Fri, 21 Feb 1997 22:39:50 -0800
# ==========================================================================
# Mapping of Request URI to Archive Entry [default is none]
#
# ArchiveMap is an ordered list of string match and replacement patterns
# in the form of an Nx3 array. Matches against the request-URI are
# attempted in the listed order and the first match wins, with the result
# being that the archive pathkey is changed to the replacement string.
# If no patterns match, the request-URI remains the pathkey.
# The first value is 'i' (case-insensitive) or 's' (case-sensitive).
# The second value is the regexp to match against the request-URI
# The third value is the replacement string if the pattern matches.
# If the replacement is '' or undef, then the request entry is excluded
# from all summary counts (this loses information).
# No replacements are made if the -n, -c, or -C, options are in use.
#
# The array value can be set en masse
#
## @ArchiveMap = (
## 's', '^/Icons/\w', 'All Icons (site)',
## 's', '^/icons/\w', 'All Icons (server)',
## 'i', '/hidden/', 'All Hidden',
## );
#
# or to append, use: push(@ArchiveMap,'i','pattern','replacement'); e.g.,
#
## push(@ArchiveMap,'i','\.gif$','All GIFs');
#
# To insert, use: unshift(@ArchiveMap,'i','pattern','replacement');
# Other array modifiers (see perl manual): splice, pop, shift.
#
In other words
push(@ArchiveMap,'i','\.gif$','');
push(@ArchiveMap,'i','\.jpg$','');
push(@ArchiveMap,'s','^/cgi-bin','');
...Roy T. Fielding
Department of Information & Computer Science (fielding@ics.uci.edu)
University of California, Irvine, CA 92697-3425 fax:+1(714)824-4056
http://www.ics.uci.edu/~fielding/