Commit e48e88a1 authored by Till Brehm's avatar Till Brehm

Merge branch 'https-before-seo' into 'stable-3.1'

Put http to https redirect before SEO in Nginx virtualhost.

See merge request !907
parents 73412c87 6311f1ed
Pipeline #1339 passed with stage
in 2 minutes and 36 seconds
......@@ -25,6 +25,13 @@ server {
root <tmpl_var name='web_document_root_www'>;
<tmpl_if name='ssl_enabled'>
<tmpl_if name='rewrite_to_https' op='==' value='y'>
if ($scheme != "https") {
rewrite ^ https://$http_host$request_uri? permanent;
}
</tmpl_if>
</tmpl_if>
<tmpl_if name='seo_redirect_enabled'>
if ($http_host <tmpl_var name='seo_redirect_operator'> "<tmpl_var name='seo_redirect_origin_domain'>") {
rewrite ^ $scheme://<tmpl_var name='seo_redirect_target_domain'>$request_uri? permanent;
......@@ -40,13 +47,6 @@ server {
rewrite ^<tmpl_var name='local_redirect_exclude'>(.*)$ <tmpl_var name='local_redirect_target'>$2 <tmpl_var name='local_redirect_type'>;
}
</tmpl_loop>
<tmpl_if name='ssl_enabled'>
<tmpl_if name='rewrite_to_https' op='==' value='y'>
if ($scheme != "https") {
rewrite ^ https://$http_host$request_uri? permanent;
}
</tmpl_if>
</tmpl_if>
<tmpl_loop name="own_redirects">
<tmpl_if name='use_rewrite'>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment