This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch quick-fix/markdown-only-when-it-exists in repository https://gitbox.apache.org/repos/asf/camel-website.git
commit 2b3a5cdb25d85338d03d42aefaa07184c28777c6 Author: Claus Ibsen <[email protected]> AuthorDate: Mon Oct 12 21:25:17 2026 +0200 chore: .htaccess - serve the Markdown copy of a page only when it exists, and llms.txt for the home page Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Signed-off-by: Claus Ibsen <[email protected]> --- static/.htaccess | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/static/.htaccess b/static/.htaccess index 910ee699..36a7e7fe 100644 --- a/static/.htaccess +++ b/static/.htaccess @@ -3,8 +3,13 @@ RewriteEngine on RewriteBase "/" # Content negotiation for LLM-friendly Markdown -# When Accept header requests text/markdown, serve .md instead of .html +# When Accept header requests text/markdown, serve llms.txt for the home page, +# and the .md copy of any other page that has one (pages without a copy stay HTML) RewriteCond %{HTTP_ACCEPT} text/markdown [NC] +RewriteRule ^index\.html$ llms.txt [L] +RewriteCond %{HTTP_ACCEPT} text/markdown [NC] +RewriteCond %{REQUEST_FILENAME} ^(.+)\.html$ +RewriteCond %1.md -f RewriteRule ^(.+)\.html$ $1.md [L] RewriteRule "^security-advisories.data/(.+)$" "security/$1" [R=permanent,L]
