301 www强制跳不带www

修改www对应的nginx配置文件添加rewrite ^(.*)$ http://www.weixiaoline.com$1 permanent;

server
{
listen 80 default_server reuseport;
#listen [::]:80 default_server ipv6only=on;
server_name _;
index index.html index.htm index.php;
root /home/wwwroot/default;

rewrite ^(.*)$ http://www.weixiaoline.com$1 permanent;

#error_page 404 /404.html;

转载请注明本文链接:https://blog.weixiaoline.com/1686.html