客户访问站点将bbs/链接 跳转至forum/链接下的两种方式

显性 302 暂时重定向跳转
server

{
listen 80 ;
server_name localhost;
index index.html index.htm index.php;
root /data/www;

location / {

rewrite ^/bbs/(.*)$ http://119.29.36.237/forum/$1;
}
隐形 301 永久重定向跳转
server

{
listen 80 ;
server_name localhost;
index index.html index.htm index.php;
root /data/www;

location / {

rewrite ^/bbs/(.*)$ /forum/$1;
}
一般建议采用隐形跳转的方式.

posted @ 2015-11-30 18:01  dantes博客  阅读(307)  评论(0编辑  收藏  举报