New variable to specify some rewrite rules

This commit is contained in:
nemunaire 2023-05-14 13:02:57 +02:00
parent 7ca5c5a378
commit aeeffda366
2 changed files with 5 additions and 0 deletions

View File

@ -2,3 +2,4 @@
path: /
error_pages:
404: /404.html
rewrite: []

View File

@ -30,6 +30,10 @@
error_page {{ error_page }} {{ error_pages[error_page] }};
{% endfor %}
#try_files $uri $uri/index.html $uri.html =404;
{% for r in rewrite %}
rewrite {{ r }};
{% endfor %}
}
location ~ /$ {
rewrite ^(.*)/ $1/index.html;