Skip to content
Snippets Groups Projects
Commit e48e88a1 authored by Till Brehm's avatar Till Brehm
Browse files

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

Put http to https redirect before SEO in Nginx virtualhost.

See merge request ispconfig/ispconfig3!907
parents 73412c87 6311f1ed
No related branches found
No related tags found
No related merge requests found
......@@ -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'>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment