diff --git a/http/apache/vhost.tpl.php b/http/apache/vhost.tpl.php index be7ae0cd2e5e73362359f349952f523533791c8f..61da1c3e388820389ea871c83c91cd90dc40dcbf 100644 --- a/http/apache/vhost.tpl.php +++ b/http/apache/vhost.tpl.php @@ -30,16 +30,16 @@ if ($this->redirection || $ssl_redirection) { if ($ssl_redirection && !$this->redirection) { // redirect aliases in non-ssl to the same alias on ssl. - print " RewriteRule ^/*(.*)$ https://%{HTTP_HOST}/$1 [L,R=301]\n"; + print " RewriteRule ^/*(.*)$ https://%{HTTP_HOST}/$1 [NE,L,R=301]\n"; } elseif ($ssl_redirection && $this->redirection) { // redirect all aliases + main uri to the main https uri. - print " RewriteRule ^/*(.*)$ https://{$this->uri}/$1 [L,R=301]\n"; + print " RewriteRule ^/*(.*)$ https://{$this->uri}/$1 [NE,L,R=301]\n"; } elseif (!$ssl_redirection && $this->redirection) { // Redirect all aliases to the main http url. print " RewriteCond %{HTTP_HOST} !^{$this->uri}$ [NC]\n"; - print " RewriteRule ^/*(.*)$ http://{$this->uri}/$1 [L,R=301]\n"; + print " RewriteRule ^/*(.*)$ http://{$this->uri}/$1 [NE,L,R=301]\n"; } } ?> diff --git a/http/apache_ssl/vhost_ssl.tpl.php b/http/apache_ssl/vhost_ssl.tpl.php index 58a99941f159255774375c76bbb189e9b59b8517..1816f06035979a6ca8efb4123c827f8518a4eea3 100644 --- a/http/apache_ssl/vhost_ssl.tpl.php +++ b/http/apache_ssl/vhost_ssl.tpl.php @@ -43,7 +43,7 @@ if (sizeof($this->aliases)) { // Redirect all aliases to the main https url. print " RewriteCond %{HTTP_HOST} !^{$this->uri}$ [NC]\n"; - print " RewriteRule ^/*(.*)$ https://{$this->uri}/$1 [L,R=301]\n"; + print " RewriteRule ^/*(.*)$ https://{$this->uri}/$1 [NE,L,R=301]\n"; } } ?>