Commit 01fb1027 authored by omega8cc's avatar omega8cc

Revert "Issue #2373923 by griz - https redirect problem with Nginx"

This reverts commit 3c5c0d4a.
parent 3c5c0d4a
<?php <?php
if ($this->redirection || $ssl_redirection) { if ($ssl_redirection || $this->redirection) {
// Redirect all aliases to the main http url using separate vhosts blocks to avoid if{} in Nginx. // Redirect all aliases to the main http url using separate vhosts blocks to avoid if{} in Nginx.
foreach ($this->aliases as $alias_url) { foreach ($this->aliases as $alias_url) {
print "# alias redirection virtual host\n"; print "# alias redirection virtual host\n";
...@@ -16,18 +16,7 @@ if ($this->redirection || $ssl_redirection) { ...@@ -16,18 +16,7 @@ if ($this->redirection || $ssl_redirection) {
print " server_name {$alias_url};\n"; print " server_name {$alias_url};\n";
} }
print " access_log off;\n"; print " access_log off;\n";
if ($ssl_redirection && !$this->redirection) { print " rewrite ^ \$scheme://{$this->redirection}\$request_uri? permanent;\n";
// redirect aliases in non-ssl to the same alias on ssl.
print " rewrite ^ https://\$host\$request_uri? permanent;\n";
}
elseif ($ssl_redirection && $this->redirection) {
// redirect all aliases + main uri to the main https uri.
print " rewrite ^ https://{$this->uri}\$request_uri? permanent;\n";
}
elseif (!$ssl_redirection && $this->redirection) {
// Redirect all aliases to the main http url.
print " rewrite ^ http://{$this->redirection}\$request_uri? permanent;\n";
}
print "}\n"; print "}\n";
} }
} }
......
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