diff --git a/roles/distgit/pagure/templates/z_pagure.conf b/roles/distgit/pagure/templates/z_pagure.conf index 7e4806643b..2a7f5deec3 100644 --- a/roles/distgit/pagure/templates/z_pagure.conf +++ b/roles/distgit/pagure/templates/z_pagure.conf @@ -30,6 +30,14 @@ WSGIProcessGroup pagureproc # +# 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