New variable to specify some rewrite rules
This commit is contained in:
parent
7ca5c5a378
commit
aeeffda366
@ -2,3 +2,4 @@
|
|||||||
path: /
|
path: /
|
||||||
error_pages:
|
error_pages:
|
||||||
404: /404.html
|
404: /404.html
|
||||||
|
rewrite: []
|
||||||
|
@ -30,6 +30,10 @@
|
|||||||
error_page {{ error_page }} {{ error_pages[error_page] }};
|
error_page {{ error_page }} {{ error_pages[error_page] }};
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
#try_files $uri $uri/index.html $uri.html =404;
|
#try_files $uri $uri/index.html $uri.html =404;
|
||||||
|
|
||||||
|
{% for r in rewrite %}
|
||||||
|
rewrite {{ r }};
|
||||||
|
{% endfor %}
|
||||||
}
|
}
|
||||||
location ~ /$ {
|
location ~ /$ {
|
||||||
rewrite ^(.*)/ $1/index.html;
|
rewrite ^(.*)/ $1/index.html;
|
||||||
|
Loading…
Reference in New Issue
Block a user