做301跳转的一种方式

做301跳转,如果是tomcat服务器或者apache可以使用.htaccess文件进行跳转

在.htaccess文件加入以下代码

<ifmodule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{HTTP_HOST} bbs.fxword.cn$ [NC]
    RewriteRule ^(.*)$ http://www.fxword.cn/$1 [R=301,L]
</ifmodule> 

  

posted @ 2020-07-10 15:49  一叶青川  阅读(201)  评论(0编辑  收藏  举报