diff --git a/static/.htaccess b/static/.htaccess index 2341f55d87e..1ae7247efd7 100644 --- a/static/.htaccess +++ b/static/.htaccess @@ -1,6 +1,12 @@ # Redirect security advisories to new location RewriteEngine on RewriteBase "/" + +# Content negotiation for LLM-friendly Markdown +# When Accept header requests text/markdown, redirect .html to .md +RewriteCond %{HTTP_ACCEPT} text/markdown [NC] +RewriteRule ^(.+)\.html$ /$1.md [R=303,L] + RewriteRule "^security-advisories.data/(.+)$" "security/$1" [R=permanent,L] # Customize what Apache returns to the client in case of an error.