url rewrite优化url的可读性

1.下载urlrewrite,官方下载地址:http://tuckey.org/urlrewrite/

2.解压缩文件,将jar放入项目,并创建urlrewrite.xml:

3.将filter添加到web.xml里

<filter>  
        <filter-name>UrlRewriteFilter</filter-name>  
        <filter-class>  
            org.tuckey.web.filters.urlrewrite.UrlRewriteFilter  
        </filter-class>  
    </filter>  
    <filter-mapping>  
        <filter-name>UrlRewriteFilter</filter-name>  
        <url-pattern>/*</url-pattern>  
    </filter-mapping> 

4.修改urlrewrite.xml规则

你可能感兴趣的:(rewrite)