Use 301 sttatus code for http redirects
This commit is contained in:
parent
5ea1bd777e
commit
9f320e3f53
|
@ -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)
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue