distgit/pagure: redirect users viewing files in the old default branch to the new default one

Fixes https://pagure.io/fedora-infrastructure/issue/9620

Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
This commit is contained in:
Pierre-Yves Chibon 2021-02-10 17:58:36 +01:00
parent 666e6e1685
commit dfc2844214

View file

@ -30,6 +30,14 @@ WSGIProcessGroup pagureproc
#</VirtualHost>
# Redirect files viewed in master to the main branch
# https://pagure.io/fedora-infrastructure/issue/9620
RedirectMatch 302 (.*)/rpms/(.*)blob/master/(.*) $1/rpms/$2/blob/rawhide/$3
RedirectMatch 302 (.*)/container/(.*)blob/master/(.*) $1/container/$2/blob/rawhide/$3
RedirectMatch 302 (.*)/flatpaks/(.*)blob/master/(.*) $1/flatpaks/$2/blob/stable/$3
RedirectMatch 302 (.*)/tests/(.*)blob/master/(.*) $1/tests/$2/blob/main/$3
RewriteEngine on
# First try the instance-specific theme