azure static web apps部署静态网页,需要设置伪静态规则
location / {
try_files $uri $uri/ /index.html;
}
这个规则,使用azure部署时,需要在运行目录添加routes.json路由配置文件。内容如下
{
"routes": [
{
"route": "/*",
"serve": "/index.html",
"statusCode": 200
}
]
}
最后更新于 2024-01-14
评论 0