the principle of Paip.java urlrewrite and implementation of htaccess normal form conversion
#---KEYWORD
#-is a form of expression
A regular expression representing a regular at the beginning of a non-specified string
Exclude the specified folder ...
Author of Old Wow's Paw attilax Ayron, email:[email protected]
Reprint please indicate source: Http://blog.csdn.net/attilax
#----The WEB. Xml
<filter>
<filter-name>UrlRewriteFilter</filter-name>
<filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-class>
<init-param>
<param-name>logLevel</param-name>
<param-value>DEBUG</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>UrlRewriteFilter</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
</filter-mapping>
#------F:\imServer\WebRoot\WEB-INF\urlrewrite.xml
<rule>
<from>^ (?! /index\.php|/images|/admin) (. *) $</from>
<to>/index.php?
$1</to>
</rule>
#----. htaccess file rule conversion:
Rewritecond $!^ (index\.php|images|admin|robots\.txt|blog)
Rewriterule ^ (. *) $ index.php/$1 [L]
References
The regular table expression represents the home of the regular _ form _ script that is not the beginning of the specified string. htm
The principle of Paip.java urlrewrite and implementation of htaccess normal form conversion