nginx环境下 宝塔不能301的问题

首先找到网站配置文件 然后在里面加

 

 

 

if ($host ~ '^xxxxx.cn'){
return 301 http://www.xxxxx.cn$request_uri;
}
if ($request_uri = /analysts-31-26-1.html){
return 301 http://www.xxxxx.cn/certifi-40-52-1.html;
}

文章中xxxxx 换成自己的域名就行

 

posted @ 2020-09-15 16:05  程绩  阅读(534)  评论(0编辑  收藏  举报