Skip to content

Commit eeecd45

Browse files
committed
updated docs to clarify rewrite rules applying to forwards as well as requests
1 parent eaebc76 commit eeecd45

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

‎docs/src/main/docbook/en-US/Rewriting_inbound.xml‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,15 @@
2626
unless the redirect attribute is set to “chain”:
2727

2828
<programlisting><![CDATA[<rewrite toCase="lowercase" redirect="chain" />]]></programlisting>
29+
30+
You should also note that rewrite rules apply to ALL Servlet requests and Servlet forwards alike;
31+
thus, can potentially apply both to the first requested URL pattern, and also to subsequent
32+
forwards to internal view-IDs. If you need to prevent rewrite rules from triggering on a view-Id,
33+
it is recommended to use a "negative lookahead" in your match statement. For instance, the
34+
following match expression prevents the rule from matching on view-id:
35+
36+
<programlisting><![CDATA[<rewrite match="^(?!.*\.xhtml.*).*" trailingSlash="append" redirect="301" />]]></programlisting>
37+
2938
</para>
3039
</section>
3140

0 commit comments

Comments
 (0)