nginx判断为404跳转

server {
listen 80;
server_name localhost www.beautysaas.com 120.26.126.123;
error_page 404 = http://www.beautysaas.com/$1;   #这个不带url后缀

 

 


location / {
root html;
index index.html index.htm index.php;
try_files $uri $uri/ /index.html?$query_string;    #这个是带url后缀的
}

posted @ 2018-11-09 18:01  天宇星空  阅读(2446)  评论(0)    收藏  举报