diff --git a/roles/httpd/redirect/tasks/main.yml b/roles/httpd/redirect/tasks/main.yml index 44d81ee3f7..7a45c4e2f1 100644 --- a/roles/httpd/redirect/tasks/main.yml +++ b/roles/httpd/redirect/tasks/main.yml @@ -8,13 +8,16 @@ # This is the only real work we do. - name: Copy over httpd redirect file for {{name}} template: > - src=redirect.conf + src={{conf}} dest=/etc/httpd/conf.d/{{website}}/{{name}}-redirect.conf mode=0644 owner=root group=root notify: - reload httpd + with_first_found: + - redirect.{{name}}.conf + - redirect.conf tags: - httpd - httpd/redirect diff --git a/roles/httpd/redirect/templates/redirect.copr.fedoraproject.org.conf b/roles/httpd/redirect/templates/redirect.copr.fedoraproject.org.conf new file mode 100644 index 0000000000..fbb1b96fa6 --- /dev/null +++ b/roles/httpd/redirect/templates/redirect.copr.fedoraproject.org.conf @@ -0,0 +1,3 @@ +RewriteEngine on +RewriteCond %{REQUEST_URI} !^/api/* +RewriteRule ^/(.*) https://copr.fedorainfracloud.org/$1 [L,R]