public class RewriteRule
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
chain
This flag chains the current rule with the next rule (which itself
can be chained with the following rule, etc.).
|
protected RewriteCond[] |
conditions |
protected boolean |
cookie
This sets a cookie on the client's browser.
|
protected java.lang.String |
cookieDomain |
protected boolean |
cookieHttpOnly |
protected int |
cookieLifetime |
protected java.lang.String |
cookieName |
protected java.lang.String |
cookiePath |
protected java.lang.ThreadLocal<java.lang.String> |
cookieResult |
protected boolean |
cookieSecure |
protected Substitution |
cookieSubstitution |
protected java.lang.String |
cookieValue |
protected boolean |
env
This forces a request attribute named VAR to be set to the value VAL,
where VAL can contain regexp back references $N and %N which will be
expanded.
|
protected java.util.ArrayList<java.lang.String> |
envName |
protected java.util.ArrayList<java.lang.ThreadLocal<java.lang.String>> |
envResult |
protected java.util.ArrayList<Substitution> |
envSubstitution |
protected java.util.ArrayList<java.lang.String> |
envValue |
protected boolean |
forbidden
This forces the current URL to be forbidden, i.e., it immediately sends
back a HTTP response of 403 (FORBIDDEN).
|
protected boolean |
gone
This forces the current URL to be gone, i.e., it immediately sends
back a HTTP response of 410 (GONE).
|
protected boolean |
host
Host.
|
protected boolean |
last
Stop the rewriting process here and don't apply any more rewriting
rules.
|
protected boolean |
next
Re-run the rewriting process (starting again with the first rewriting
rule).
|
protected boolean |
nocase
This makes the Pattern case-insensitive, i.e., there is no difference
between 'A-Z' and 'a-z' when Pattern is matched against the current
URL.
|
protected boolean |
noescape
This flag keeps mod_rewrite from applying the usual URI escaping rules
to the result of a rewrite.
|
protected boolean |
nosubreq
This flag forces the rewriting engine to skip a rewriting rule if the
current request is an internal sub-request.
|
protected java.lang.ThreadLocal<java.util.regex.Pattern> |
pattern |
protected java.lang.String |
patternString |
protected boolean |
qsappend
This flag forces the rewriting engine to append a query string part in
the substitution string to the existing one instead of replacing it.
|
protected boolean |
redirect
Prefix Substitution with http://thishost[:thisport]/ (which makes the
new URL a URI) to force a external redirection.
|
protected int |
redirectCode |
protected int |
skip
This flag forces the rewriting engine to skip the next num rules in
sequence when the current rule matches.
|
protected Substitution |
substitution |
protected java.lang.String |
substitutionString |
protected boolean |
type
Force the MIME-type of the target file to be MIME-type.
|
protected java.lang.String |
typeValue |
Constructor and Description |
---|
RewriteRule() |
Modifier and Type | Method and Description |
---|---|
void |
addCondition(RewriteCond condition) |
void |
addEnvName(java.lang.String envName) |
void |
addEnvValue(java.lang.String envValue) |
java.lang.CharSequence |
evaluate(java.lang.CharSequence url,
Resolver resolver)
Evaluate the rule based on the context
|
RewriteCond[] |
getConditions() |
java.lang.String |
getCookieDomain() |
int |
getCookieLifetime() |
java.lang.String |
getCookieName() |
java.lang.String |
getCookiePath() |
java.lang.String |
getCookieResult() |
java.lang.String |
getCookieValue() |
java.lang.String |
getEnvName(int i) |
java.lang.String |
getEnvResult(int i) |
int |
getEnvSize() |
java.lang.String |
getEnvValue(int i) |
java.lang.String |
getPatternString() |
int |
getRedirectCode() |
int |
getSkip() |
Substitution |
getSubstitution() |
java.lang.String |
getSubstitutionString() |
java.lang.String |
getTypeValue() |
boolean |
isChain() |
boolean |
isCookie() |
boolean |
isCookieHttpOnly() |
boolean |
isCookieSecure() |
boolean |
isEnv() |
boolean |
isEscapeBackReferences() |
boolean |
isForbidden() |
boolean |
isGone() |
boolean |
isHost() |
boolean |
isLast() |
boolean |
isNext() |
boolean |
isNocase() |
boolean |
isNoescape() |
boolean |
isNosubreq() |
boolean |
isQsappend() |
boolean |
isRedirect() |
boolean |
isType() |
void |
parse(java.util.Map<java.lang.String,RewriteMap> maps) |
void |
setChain(boolean chain) |
void |
setConditions(RewriteCond[] conditions) |
void |
setCookie(boolean cookie) |
void |
setCookieDomain(java.lang.String cookieDomain) |
void |
setCookieHttpOnly(boolean cookieHttpOnly) |
void |
setCookieLifetime(int cookieLifetime) |
void |
setCookieName(java.lang.String cookieName) |
void |
setCookiePath(java.lang.String cookiePath) |
void |
setCookieSecure(boolean cookieSecure) |
void |
setCookieValue(java.lang.String cookieValue) |
void |
setEnv(boolean env) |
void |
setEscapeBackReferences(boolean escapeBackReferences) |
void |
setForbidden(boolean forbidden) |
void |
setGone(boolean gone) |
void |
setHost(boolean host) |
void |
setLast(boolean last) |
void |
setNext(boolean next) |
void |
setNocase(boolean nocase) |
void |
setNoescape(boolean noescape) |
void |
setNosubreq(boolean nosubreq) |
void |
setPatternString(java.lang.String patternString) |
void |
setQsappend(boolean qsappend) |
void |
setRedirect(boolean redirect) |
void |
setRedirectCode(int redirectCode) |
void |
setSkip(int skip) |
void |
setSubstitution(Substitution substitution) |
void |
setSubstitutionString(java.lang.String substitutionString) |
void |
setType(boolean type) |
void |
setTypeValue(java.lang.String typeValue) |
java.lang.String |
toString()
String representation.
|
protected RewriteCond[] conditions
protected java.lang.ThreadLocal<java.util.regex.Pattern> pattern
protected Substitution substitution
protected java.lang.String patternString
protected java.lang.String substitutionString
protected boolean chain
protected boolean cookie
protected java.lang.String cookieName
protected java.lang.String cookieValue
protected java.lang.String cookieDomain
protected int cookieLifetime
protected java.lang.String cookiePath
protected boolean cookieSecure
protected boolean cookieHttpOnly
protected Substitution cookieSubstitution
protected java.lang.ThreadLocal<java.lang.String> cookieResult
protected boolean env
protected java.util.ArrayList<java.lang.String> envName
protected java.util.ArrayList<java.lang.String> envValue
protected java.util.ArrayList<Substitution> envSubstitution
protected java.util.ArrayList<java.lang.ThreadLocal<java.lang.String>> envResult
protected boolean forbidden
protected boolean gone
protected boolean host
protected boolean last
protected boolean next
protected boolean nocase
protected boolean noescape
protected boolean nosubreq
protected boolean qsappend
protected boolean redirect
protected int redirectCode
protected int skip
protected boolean type
protected java.lang.String typeValue
public void parse(java.util.Map<java.lang.String,RewriteMap> maps)
public void addCondition(RewriteCond condition)
public java.lang.CharSequence evaluate(java.lang.CharSequence url, Resolver resolver)
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isEscapeBackReferences()
public void setEscapeBackReferences(boolean escapeBackReferences)
public boolean isChain()
public void setChain(boolean chain)
public RewriteCond[] getConditions()
public void setConditions(RewriteCond[] conditions)
public boolean isCookie()
public void setCookie(boolean cookie)
public java.lang.String getCookieName()
public void setCookieName(java.lang.String cookieName)
public java.lang.String getCookieValue()
public void setCookieValue(java.lang.String cookieValue)
public java.lang.String getCookieResult()
public boolean isEnv()
public int getEnvSize()
public void setEnv(boolean env)
public java.lang.String getEnvName(int i)
public void addEnvName(java.lang.String envName)
public java.lang.String getEnvValue(int i)
public void addEnvValue(java.lang.String envValue)
public java.lang.String getEnvResult(int i)
public boolean isForbidden()
public void setForbidden(boolean forbidden)
public boolean isGone()
public void setGone(boolean gone)
public boolean isLast()
public void setLast(boolean last)
public boolean isNext()
public void setNext(boolean next)
public boolean isNocase()
public void setNocase(boolean nocase)
public boolean isNoescape()
public void setNoescape(boolean noescape)
public boolean isNosubreq()
public void setNosubreq(boolean nosubreq)
public boolean isQsappend()
public void setQsappend(boolean qsappend)
public boolean isRedirect()
public void setRedirect(boolean redirect)
public int getRedirectCode()
public void setRedirectCode(int redirectCode)
public int getSkip()
public void setSkip(int skip)
public Substitution getSubstitution()
public void setSubstitution(Substitution substitution)
public boolean isType()
public void setType(boolean type)
public java.lang.String getTypeValue()
public void setTypeValue(java.lang.String typeValue)
public java.lang.String getPatternString()
public void setPatternString(java.lang.String patternString)
public java.lang.String getSubstitutionString()
public void setSubstitutionString(java.lang.String substitutionString)
public boolean isHost()
public void setHost(boolean host)
public java.lang.String getCookieDomain()
public void setCookieDomain(java.lang.String cookieDomain)
public int getCookieLifetime()
public void setCookieLifetime(int cookieLifetime)
public java.lang.String getCookiePath()
public void setCookiePath(java.lang.String cookiePath)
public boolean isCookieSecure()
public void setCookieSecure(boolean cookieSecure)
public boolean isCookieHttpOnly()
public void setCookieHttpOnly(boolean cookieHttpOnly)
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.