From 9f320e3f5313570578f3fb4e0d780fe11879cf05 Mon Sep 17 00:00:00 2001 From: Marc Aymerich Date: Tue, 19 Jan 2016 12:05:42 +0000 Subject: [PATCH] Use 301 sttatus code for http redirects --- orchestra/contrib/websites/backends/apache.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/orchestra/contrib/websites/backends/apache.py b/orchestra/contrib/websites/backends/apache.py index 89dd2b55..44361521 100644 --- a/orchestra/contrib/websites/backends/apache.py +++ b/orchestra/contrib/websites/backends/apache.py @@ -319,9 +319,9 @@ class Apache2Backend(ServiceController): for redirect in directives.get('redirect', []): location, target = redirect.split() if re.match(r'^.*[\^\*\$\?\)]+.*$', redirect): - redirect = "RedirectMatch %s %s" % (location, target) + redirect = "RedirectMatch 301 %s %s" % (location, target) else: - redirect = "Redirect %s %s" % (location, target) + redirect = "Redirect 301 %s %s" % (location, target) redirects.append( (location, redirect) )