Closed anarcat closed 7 years ago
In general, yes, old URLs should be supported if that’s easy. The redirects are configured at https://anonscm.debian.org/git/mirror/dsa-puppet.git/tree/modules/roles/templates/static-mirroring/vhost/manpages.debian.org.erb#n26
Looks like this could be expanded by removing the condition?
# Redirect old CGI paths, keeping at least the manpage (the other
# parameters are left out for simplicity).
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^/cgi-bin/man.cgi$ / [redirect=301,last]
RewriteCond %{QUERY_STRING} (?:.*(?:^|&))query=([^&]+)
RewriteRule ^/cgi-bin/man.cgi /%1 [redirect=307,qsdiscard,last]
... not sure.
Inserting the following lines above line 16 works in my local tests:
RewriteCond %{QUERY_STRING} (?:.*(?:^|&))query=([^&]+)
RewriteRule ^/?$ /%1 [redirect=307,qsdiscard,last]
I’ll ask DSA to pull my config change.
Forgot to follow up on this issue, but the changes were merged two weeks ago and the syntax actually works.
I have found links in the wild (in my own blog, namely) that point to
?query=man
-style URLs. An example I had was:https://manpages.debian.org/?query=dh-make
Those do not work anymore: they just show the homepage.
Now, maybe that never worked, but I'm pretty confident it did. Do we want to support old URLs like this?