Add support for /example-note.txt path format
coignard opened this issue · comments
René Coignard commented
René Coignard commented
location / {
try_files $uri $uri/ @rewrite;
}
location = /sitemap.xml {
try_files $uri /index.php?go=sitemap.xml;
}
location @rewrite {
rewrite ^/(.+)\.txt/$ $scheme://$host/$1.txt permanent;
rewrite ^/(.+)\.txt$ /index.php?go=$1 last;
rewrite ^/([^/]+)$ $scheme://$host/$1/ permanent;
rewrite ^/(.*)/$ /index.php?go=$1 last;
}