首页 > Nginx 如何配置所有 URL 都指向一个HTML

Nginx 如何配置所有 URL 都指向一个HTML

必须在不使用重定向的情况下

但是排除以 https://www.xxx.com/api/v1的请求


location / {

root     “你的页面路径”;
index.html;

}
location api/v1 {

这里配置你之前的就可以了

}


不使用rewrite好像不行吧。
404文件指定为index.html?

【热门文章】
【热门文章】