X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Froles%2Ftemplates%2Fstatic-mirroring%2Fvhost%2Fmanpages.debian.org.erb;h=c4983a922fffcd970cbc129afb10e4baaf26df97;hb=26e6a6719a872fd0cb8449f3604ab17c65b08261;hp=103b8f10768037371eed319f520546bfeeeabee9;hpb=d038c9eed1c4b0adf168108d2f1ea8d2b4ac827c;p=mirror%2Fdsa-puppet.git diff --git a/modules/roles/templates/static-mirroring/vhost/manpages.debian.org.erb b/modules/roles/templates/static-mirroring/vhost/manpages.debian.org.erb index 103b8f107..c4983a922 100644 --- a/modules/roles/templates/static-mirroring/vhost/manpages.debian.org.erb +++ b/modules/roles/templates/static-mirroring/vhost/manpages.debian.org.erb @@ -13,6 +13,11 @@ RewriteMap manpagesall dbm:/srv/static.debian.org/mirrors/manpages.debian.org/cur/rwmap.dbm RewriteMap lc int:tolower + # Redirect old CGI paths (without CGI file name), keeping at least the + # manpage (the other parameters are left out for simplicity). + RewriteCond %{QUERY_STRING} (?:.*(?:^|&))query=([^&]+) + RewriteRule ^/?$ /%1 [redirect=307,qsdiscard,last] + # URLs which end in a slash do not need to be rewritten RewriteRule /$ - [last] @@ -85,6 +90,12 @@ Require all denied + # DefaultType doesn’t work since Apache 2.3.x, so we need to match + # non-HTML files to work around https://bugs.debian.org/880542 + + ForceType text/plain + + # To set the correct Content-Type (e.g. text/html). RemoveType .gz AddEncoding gzip gz