任何作为子文件夹放置的东西,它都会读取 domain.com/index.html
与此类似,但在 Nginx 中 将 URL 不存在的子文件夹重定向到根目录
server {
listen 80;
listen [::]:80;
server_name example.com;
root /apt/website/path;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
}