如果用户请求URL不存在的跳转
location / {
root /opt/blog;
index index.html;
if ( !-f $request_filename ){
rewrite (.*) http://www.niyueling.cn;
}
}
location / {
root /opt/blog;
index index.html;
if ( !-f $request_filename ){
rewrite (.*) http://www.niyueling.cn;
}
}