作为子文件夹的任何内容,它将读取domain.com/index.html
与此类似,但在Nginx中 Redirect URL non existent subfolder to root
答案 0 :(得分:0)
server {
listen 80;
listen [::]:80;
server_name example.com;
root /apt/website/path;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
}