Tomcat 301 obviously does not provide this function and should be more correctly called JAVA301, which is suitable for friends who want to be friendly to SEO.
Without further explanation, when doing SEO, JAVA basically chooses urlrewrite, so the following is how to combine urlrewrite to do domain name jump. For 301, this article is basically the best one. Paste the code directly below.
Note that the condition below does not refer to the domain name you want to intercept but corresponds to the domain name you want to jump to. For example, if VeVB.COm jumps to www.VeVB.COm, then fill in www.VeVB.COm in the condition.
The first urlrewrite configuration:
Copy the code code as follows:
<urlrewrite>
<rule>
<name>seo redirect</name>
<condition name="host" operator="notequal">^www.VeVB.COm</condition>
<from>^/(.*)</from>
<to type="permanent-redirect" last="true">//www.VeVB.COm/$1</to>
</rule>
</urlrewrite>
The second urlrewrite configuration:
Copy the code code as follows:
<urlrewrite>
<rule>
<name>seo redirect</name>
<condition name="host" operator="notequal">^www.VeVB.COm</condition>
<condition name="host" operator="notequal">^localhost</condition>
<from>^/(.*)</from>
<to type="permanent-redirect" last="true">//www.VeVB.COm/$1</to>
</rule>
</urlrewrite>