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后缀的
}


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM