guilin520 发表于 2015-7-17 23:50:15

Linux 301 求教程

服务器操作系统:Linux
Web 服务器:nginx/1.6.2

xxxx.com301跳到 www.xxx.com

老张 发表于 2015-7-18 00:15:08

找到网站的配置文件 xxxxx.conf 第二步找到server段代码server{listen       80;server_name www.xxxx.com xxxx.com;}在server段域名下设置:if ($host = 'xxxx.com' ) {      rewrite ^/(.*)$ http://www.xxxx.com/$1 permanent; }
重启nginx,这样我们就完成了nginx下301的跳转设置。

还我漂漂拳 发表于 2015-7-18 13:03:16


特价猫   有特色网   淘牛品   http://www.utese.cn

页: [1]
查看完整版本: Linux 301 求教程