How to format the content of all markdown files, not just the about pages?

jean-christophe manciot actionmystique at gmail.com
Fri Dec 28 10:15:18 CET 2018


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: <http://lists.zx2c4.com/pipermail/cgit/attachments/20181228/27916204/attachment.html>


More information about the CGit mailing list