如何在Ngnix配置中设置文件的绝对路径

时间:2018-08-09 17:02:08

标签: regex nginx routing single-page-application nginx-location

我有我的ngnix配置。

location ~* ^[^.]*$ {
rewrite ^.*$ /index.html;
}

例如,如果我去/books/book。然后返回/ books中的index.html。因此,我的bundle.js在路径/books/bundle.js中不存在。 如何从根目录设置index.html?

0 个答案:

没有答案
相关问题