67,550
社区成员




public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.sendRedirect("/a.jsp");
}
<urlrewrite>
<rule>
<from>/a.jsp</from>
<to>/index.jsp</to>
</rule>
</urlrewrite>
.....
<servlet-mapping>
<servlet-name>plugin_match</servlet-name>
<url-pattern>/dyn/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>plugin_match</servlet-name>
<url-pattern>/html/*</url-pattern>
</servlet-mapping>
.....
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE urlrewrite PUBLIC "-//tuckey.org//DTD UrlRewrite 2.6//EN"
"http://tuckey.org/res/dtds/urlrewrite2.6.dtd">
<urlrewrite decode-using="GBK">
<rule>
<from>html/(about|play|play_02|play_03|play_04|play_05|play_06|play_07|play_08|play_09|shop|feature).htm$</from>
<to type="forward">html/$1.jsp</to>
</rule>
<rule>
<from>html/news_content_(\w+).html$</from>
<to type="forward">html/news_content.jsp?id=$1</to>
</rule>
<rule>
<from>dyn/newslist_(\w+).html$</from>
<to type="forward">html/news.jsp?type=$1</to>
</rule>
<rule>
<from>dyn/newshow_([0-9]+).html$</from>
<to type="forward">html/news_content.jsp?id=$1</to>
</rule>
<rule>
<from>dyn/piclist_([0-9]+).html$</from>
<to type="forward">html/pic.jsp?id=$1</to>
</rule>
<rule>
<from>dyn/picshow_([0-9]+).html$</from>
<to type="forward">html/pic_content.jsp?id=$1</to>
</rule>
<rule>
<from>dyn/reviselist.html</from>
<to type="forward">html/revises.jsp</to>
</rule>
<rule>
<from>dyn/reviseshow_([0-9]+).html$</from>
<to type="forward">html/revisescontent.jsp?id=$1</to>
</rule>
<rule>
<from>dyn/system.html</from>
<to type="forward">html/system.jsp</to>
</rule>
<rule>
<from>dyn/topicshow_([0-9]+).html$</from>
<to type="forward">html/system_content.jsp?id=$1</to>
</rule>
<rule>
<from>dyn/faqlist.html</from>
<to type="forward">html/faq.jsp</to>
</rule>
<rule>
<from>dyn/faqshow_([0-9]+).html$</from>
<to type="forward">html/faq_content.jsp?id=$1</to>
</rule>
</urlrewrite>