我试图在配置中设置一个位置,让我可以做一些事情,如 https://example.com/car/<vin>
不会去的 <vin>
应用程序或目录,但要 /car/index.html
. 从那里,我将读取URL或通过 <vin>
到 /car/index.html
.
我尝试了各种regex位置块,比如下面的一个,但当访问时,它们都会导致404。/car/<vin>
.
location ~ ^/car/(.*)$ {
root $document_root/car/
index index.html;
}
什么是合适的位置块?