tbrehm
2012-04-12 02bf997271f4d09e91c8fcb9cecd08f06f2400c4
server/plugins-available/apache2_plugin.inc.php
@@ -709,6 +709,11 @@
      $vhost_data['ssl_domain'] = $data['new']['ssl_domain'];
      $vhost_data['has_custom_php_ini'] = $has_custom_php_ini;
      $vhost_data['custom_php_ini_dir'] = escapeshellcmd($custom_php_ini_dir);
      // Custom Apache directives
      // Make sure we only have Unix linebreaks
      $vhost_data['apache_directives'] = str_replace("\r\n", "\n", $vhost_data['apache_directives']);
      $vhost_data['apache_directives'] = str_replace("\r", "\n", $vhost_data['apache_directives']);
      // Check if a SSL cert exists
      $ssl_dir = $data['new']['document_root'].'/ssl';
@@ -750,7 +755,7 @@
      // Rewrite rules
      $rewrite_rules = array();
      if($data['new']['redirect_type'] != '') {
      if($data['new']['redirect_type'] != '' && $data['new']['redirect_path'] != '') {
         if(substr($data['new']['redirect_path'],-1) != '/') $data['new']['redirect_path'] .= '/';
         if(substr($data['new']['redirect_path'],0,8) == '[scheme]'){
            $rewrite_target = 'http'.substr($data['new']['redirect_path'],8);
@@ -816,7 +821,7 @@
            }
            $app->log('Add server alias: '.$alias['domain'],LOGLEVEL_DEBUG);
            // Rewriting
            if($alias['redirect_type'] != '') {
            if($alias['redirect_type'] != '' && $alias['redirect_path'] != '') {
               if(substr($alias['redirect_path'],-1) != '/') $alias['redirect_path'] .= '/';
               if(substr($alias['redirect_path'],0,8) == '[scheme]'){
                  $rewrite_target = 'http'.substr($alias['redirect_path'],8);