The RewriteHandler processes a list of rules and checks each in turn, ignoring those that don't match the request. It then applies the ones that match. It is inspired by Apache's mod-rewrite, but can do many things aside from rewriting URIs. See the rule list below for information about individual rules included with Jetty.
Abstract rule to use as a base class for rules that use a PathMap for pattern matching. It uses the servlet pattern syntax. Below are known subclasses of PatternRule, and descriptions of their actions:
Adds a cookie to the response.
Adds/modifies a header in the response.
Redirects the response.
Sends the response code (status or error).
Rewrite the URI by replacing the matched request path with a fixed string.
Abstract rule to use as a base class for rules that match with a regular expression. Below are known subclasses of RegexRule, and descriptions of their actions:
Rewrite the URI by matching with a regular expression. (The replacement string may use
$nto replace the nth capture group.)
Disables the keep alive for SSL from IE5 or IE6.
Rule implementing the legacy API of RewriteHandler
Below is a sample configuration for jetty-rewrite.xml.
To use this configuration, include the configuration file during jetty startup. Example below.