TAG NAME url_rewrite_program

Description Specifies the location of the executable for the URL redirector
Build Option
Default
Usage
url_rewrite_program path/to/rewriter/program
Default
none
Synopsis
Specify the location of the executable for the URL rewriter. Since they can perform almost any function there isn’t one included.

For each requested URL, the rewriter will receive a line input with the following format
URL <SP> client_ip “/” fqdn <SP> user <SP> method <SP> urlgroup [<SP> kvpairs] <NL>

The rewriter In the future, the rewriter interface will be extended with key=value pairs (“kvpairs” shown above).  Rewriter programs should be prepared to receive and possibly ignore additional whitespace-separated tokens on each input line.

The rewriter may return a rewritten URL. The other components of the request line does not need to be returned (ignored if they are).

The rewriter can also indicate that a client-side redirect should be performed to the new URL. This is done by prefixing the returned URL with “301:” (moved permanently) or 302: (moved temporarily).


It can also return a “urlgroup” that can subsequently be matched in cache_peer_access and similar ACL driven rules. An urlgroup is returned by prefixing the returned url with “!urlgroup!”


By default, a URL rewriter is not used.
Arguments

path
Location of the rewriter program
rewriter
Executable file that performs the rewrite process

Example(s)
url_rewrite_program /usr/local/squirm/bin/squirm