From mboxrd@z Thu Jan 1 00:00:00 1970 From: actionmystique at gmail.com (jean-christophe manciot) Date: Fri, 28 Dec 2018 10:15:18 +0100 Subject: How to format the content of all markdown files, not just the about pages? In-Reply-To: References: <20181227022346.4be88c76@leda> Message-ID: OK, but redirecting all URLs containing files which can be formatted by the about filter & located below /tree to /about is not effective: location ~ \.(md|MD|rst|RST|[1-9]|html|HTML|txt|TXT)$ { rewrite ^(/.*)/tree/(.*)$ $1/about/$2 permanent; } leads to a "404 Not Found". For instance, https://git.sdxlive.com/PPA/tree/Wireshark/README.md, I get the error log: 2018/12/27 12:52:49 [error] 20915#20915: *1 open() "/usr/share/nginx/html/PPA/about/Wireshark/README.md" failed (2: No such file or directory), client: 2a01:cb00:745:c100:26d7:494a:7c78:c99a, server: git.sdxlive.com, request: "GET /PPA/about/Wireshark/README.md HTTP/2.0", host: "git.sdxlive.com", referrer: " https://git.sdxlive.com/PPA/tree/Wireshark" If I remove the location/rewrite directives and restart nginx, the same URL https://git.sdxlive.com/PPA/tree/Wireshark/README.md is correctly displayed & formatted with the about filter. What am I missing? -- Jean-Christophe -------------- next part -------------- An HTML attachment was scrubbed... URL: