nginx 设置301

server
{
listen 80 default_server reuseport;
#listen [::]:80 default_server ipv6only=on;
server_name _;
return 301 http://xxx.com$request_uri;
index index.html index.htm index.php;
root /home/wwwroot/default;

error_page 404 /index.php;

# Deny access to PHP files in specific directory
#location ~ /(wp-content|uploads|wp-includes|images)/.*\.php$ { deny all; }