- All Implemented Interfaces:
- java.io.Serializable
public class UrlRewriteRule
extends java.lang.Object
implements java.io.Serializable
records a rewrite rule for use in URL rewriting such as by nginx;
from and to are expected to be usual regex replacement strings,
with the convention here (for portability) that:
from should match the entire path (internally is wrapped with ^ and $ for nginx);
to can refer to $1, $2 from the groups in from
so eg use from = (.*)A(.*) and to = $1B$2 to change all occurrences of A to B
- See Also:
- Serialized Form