Commit e94ca9f3 authored by Ninos's avatar Ninos
Browse files

Fixed: Rewrite proxy for ssl targets

parent 17045361
......@@ -517,6 +517,9 @@
RewriteCond %{REQUEST_URI} !^/php-fcgi/
RewriteCond %{REQUEST_URI} !^<tmpl_var name='rewrite_target'>
</tmpl_if>
<tmpl_if name="rewrite_target_is_ssl" op="==" value="y">
SSLProxyEngine On
</tmpl_if>
RewriteRule ^/(.*)$ <tmpl_var name='rewrite_target'><tmpl_if name="rewrite_add_path" op="==" value="y">$1</tmpl_if> <tmpl_var name='rewrite_type'>
......
......@@ -1372,13 +1372,14 @@ class apache2_plugin {
$rewrite_rules[] = array('rewrite_domain' => '^'.$this->_rewrite_quote($data['new']['domain']),
'rewrite_type' => ($data['new']['redirect_type'] == 'no')?'':'['.$data['new']['redirect_type'].']',
'rewrite_target' => $rewrite_target,
'rewrite_target_is_ssl' => ('https://' === substr($rewrite_target, 0, 8) ? 'y' : 'n'),
'rewrite_target_ssl' => $rewrite_target_ssl,
'rewrite_is_url' => ($this->_is_url($rewrite_target) ? 'y' : 'n'),
'rewrite_add_path' => (substr($rewrite_target, -1) == '/' ? 'y' : 'n'));
$rewrite_rules[] = array('rewrite_domain' => '^' . $this->_rewrite_quote('www.'.$data['new']['domain']),
'rewrite_type' => ($data['new']['redirect_type'] == 'no')?'':'['.$data['new']['redirect_type'].']',
'rewrite_target' => $rewrite_target,
'rewrite_target_ssl' => $rewrite_target_ssl,
'rewrite_target_is_ssl' => ('https://' === substr($rewrite_target, 0, 8) ? 'y' : 'n'),
'rewrite_is_url' => ($this->_is_url($rewrite_target) ? 'y' : 'n'),
'rewrite_add_path' => (substr($rewrite_target, -1) == '/' ? 'y' : 'n'));
break;
......@@ -1386,7 +1387,7 @@ class apache2_plugin {
$rewrite_wildcard_rules[] = array( 'rewrite_domain' => '(^|\.)'.$this->_rewrite_quote($data['new']['domain']),
'rewrite_type' => ($data['new']['redirect_type'] == 'no')?'':'['.$data['new']['redirect_type'].']',
'rewrite_target' => $rewrite_target,
'rewrite_target_ssl' => $rewrite_target_ssl,
'rewrite_target_is_ssl' => ('https://' === substr($rewrite_target, 0, 8) ? 'y' : 'n'),
'rewrite_is_url' => ($this->_is_url($rewrite_target) ? 'y' : 'n'),
'rewrite_add_path' => (substr($rewrite_target, -1) == '/' ? 'y' : 'n'));
break;
......@@ -1394,7 +1395,7 @@ class apache2_plugin {
$rewrite_rules[] = array( 'rewrite_domain' => '^'.$this->_rewrite_quote($data['new']['domain']),
'rewrite_type' => ($data['new']['redirect_type'] == 'no')?'':'['.$data['new']['redirect_type'].']',
'rewrite_target' => $rewrite_target,
'rewrite_target_ssl' => $rewrite_target_ssl,
'rewrite_target_is_ssl' => ('https://' === substr($rewrite_target, 0, 8) ? 'y' : 'n'),
'rewrite_is_url' => ($this->_is_url($rewrite_target) ? 'y' : 'n'),
'rewrite_add_path' => (substr($rewrite_target, -1) == '/' ? 'y' : '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