首页 > 其他 > 详细

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

时间:2015-11-30 20:24:59      阅读:414      评论:0      收藏:0      [点我收藏+]

显性 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;
}
一般建议采用隐形跳转的方式.

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

原文:http://www.cnblogs.com/dantes91/p/5007940.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!