Apache's mod_rewrite provides methods to map values to attributes using the directive RewriteMap. One not so well known feature of mod_rewrite is to extend this functionality with internal functions, which can be defined in a seperate Apache module. mod_icpquery is an Apache-2.0/2.2 compatible module that extends mod_rewrite by internal RewriteMap functions. It sends out a request as a UDP query to a list of Unicast or multicast addresses. This query conforms to RFC 2186, also known as ICP, and can be handled by various HTTP-caching servers such as squid. A cache-server handling ICP should reply to an ICP query with an ICP response indicating if it holds the desired object in its cache or not. This information can be further processed by mod_rewrite using its superb regex rules.