Tomcat 301 Obviously does not provide this feature should be more correct called JAVA301, suitable for friends to do friendly SEO
Do not explain more, do SEO words Java basic election Urlrewrite, so the following is how to combine urlrewrite do domain name jump. For 301 This article is basically the essence of the paste. The following code is directly attached.
Note that the following condition is not what domain name you want to intercept but with the domain name you want to jump, such as jb51.net jump www.jb51.net that condition fill in www.jb51.net
The first type of urlrewrite configuration:
Copy Code code as follows:
<urlrewrite>
<rule>
<name>seo redirect</name>
<condition name= "host" operator= "NotEqual" >^www.jb51.net</condition>
<from>^/(. *) </from>
<to type= "Permanent-redirect" last= "true" >http://www.jb51.net/$1</to>
</rule>
</urlrewrite>
The second type of urlrewrite configuration:
Copy Code code as follows:
<urlrewrite>
<rule>
<name>seo redirect</name>
<condition name= "host" operator= "NotEqual" >^www.jb51.net</condition>
<condition name= "host" operator= "NotEqual" >^localhost</condition>
<from>^/(. *) </from>
<to type= "Permanent-redirect" last= "true" >http://www.jb51.net/$1</to>
</rule>
</urlrewrite>