From f391fed20b872e09fb2ff9c7619279e5cae74a4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Such=C3=BD?= Date: Fri, 13 Nov 2015 10:56:27 +0100 Subject: [PATCH] rewrite url for cockpit team --- roles/copr/backend/files/lighttpd/lighttpd.conf | 3 +++ roles/copr/frontend/files/httpd/coprs_ssl.conf | 3 +++ 2 files changed, 6 insertions(+) diff --git a/roles/copr/backend/files/lighttpd/lighttpd.conf b/roles/copr/backend/files/lighttpd/lighttpd.conf index fd8c0e2be8..f41ad2b5a1 100644 --- a/roles/copr/backend/files/lighttpd/lighttpd.conf +++ b/roles/copr/backend/files/lighttpd/lighttpd.conf @@ -79,6 +79,7 @@ var.socket_dir = home_dir + "/sockets" server.modules = ( "mod_access", "mod_setenv", + "mod_redirect", ) ## @@ -465,3 +466,5 @@ $HTTP["url"] =~ "\.log\.gz$" { setenv.add-response-header = ( "Content-Encoding" => "gzip") mimetype.assign = ("" => "text/plain" ) } + +url.redirect = ( "^/results/sgallagh/cockpit-preview/(.+)" => "/results/@cockpit/cockpit-preview/$1" ) diff --git a/roles/copr/frontend/files/httpd/coprs_ssl.conf b/roles/copr/frontend/files/httpd/coprs_ssl.conf index 9914597a02..901ac4432a 100644 --- a/roles/copr/frontend/files/httpd/coprs_ssl.conf +++ b/roles/copr/frontend/files/httpd/coprs_ssl.conf @@ -24,5 +24,8 @@ WSGIApplicationGroup %{GLOBAL} Require all granted + + RewriteEngine on + RewriteRule ^/coprs/sgallagh/cockpit-preview/(.*)$ /coprs/g/cockpit/cockpit-preview/$1 [R=301]