nginx 如何配置指向带有hash值的index.html文件?-灵析社区

素素数数

用正则表达式: server { listen 80; location / { root html/demo; index index.html; try_files $uri $uri/ @hashed; } location @hashed { if (-f $document_root$uri/index.*.html) { rewrite ^/(.*)/$ /$1/index.*.html break; } try_files $uri =404; } }

阅读量:1

点赞量:0

问AI