X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;ds=sidebyside;f=modules%2Froles%2Ftemplates%2Fstatic-mirroring%2Fvhost%2Fmanpages.debian.org.erb;h=8305ca6f7b1e64de78b88dc679d0f2f90108e0ec;hb=540105b4935b33f9805206bf78a143f778292418;hp=b553829d5f803b5bf42e9eeb9f631850c105e11d;hpb=981874fde01eaa8d8b251d7ab8ccfffecd7e1d13;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 b553829d5..8305ca6f7 100644 --- a/modules/roles/templates/static-mirroring/vhost/manpages.debian.org.erb +++ b/modules/roles/templates/static-mirroring/vhost/manpages.debian.org.erb @@ -10,9 +10,14 @@ SetEnvIf Accept-Language "^$" ACCLANG=en INITIAL=t RewriteEngine on - RewriteMap manpagesall dbm:/srv/manpages.debian.org/www/rwmap.dbm + 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]