| | |
| | | exec("cp /usr/local/ispconfig/server/conf-custom/error/".substr(escapeshellcmd($conf["language"]),0,2)."/* ".$error_page_path);
|
| | | }
|
| | | else {
|
| | | if (file_exists("/usr/local/ispconfig/server/conf-custom/error/fileNotFound.html")){
|
| | | if (file_exists("/usr/local/ispconfig/server/conf-custom/error/400.html")){
|
| | | exec("cp /usr/local/ispconfig/server/conf-custom/error/*.html ".$error_page_path);
|
| | | }
|
| | | else {
|
| | |
| | | }
|
| | |
|
| | | // copy the standard index page
|
| | | if (file_exists("/usr/local/ispconfig/server/conf-custom/index/".substr(escapeshellcmd($conf["language"]),0,2)."/index.html")){
|
| | | exec("cp /usr/local/ispconfig/server/conf-custom/index/".substr(escapeshellcmd($conf["language"]),0,2)."/* ".escapeshellcmd($data["new"]["document_root"])."/web/");
|
| | | if (file_exists("/usr/local/ispconfig/server/conf-custom/index/standard_index.html_".substr(escapeshellcmd($conf["language"]),0,2))){
|
| | | exec("cp /usr/local/ispconfig/server/conf-custom/index/standard_index.html_".substr(escapeshellcmd($conf["language"]),0,2)." ".escapeshellcmd($data["new"]["document_root"])."/web/index.html");
|
| | | }
|
| | | else {
|
| | | if (file_exists("/usr/local/ispconfig/server/conf-custom/index/default/index.html")){
|
| | | exec("cp /usr/local/ispconfig/server/conf-custom/index/default/* ".escapeshellcmd($data["new"]["document_root"])."/web/");
|
| | | if (file_exists("/usr/local/ispconfig/server/conf-custom/index/standard_index.html")){
|
| | | exec("cp /usr/local/ispconfig/server/conf-custom/index/standard_index.html ".escapeshellcmd($data["new"]["document_root"])."/web/index.html");
|
| | | }
|
| | | else {
|
| | | exec("cp /usr/local/ispconfig/server/conf/index/standard_index.html_".substr(escapeshellcmd($conf["language"]),0,2)." ".escapeshellcmd($data["new"]["document_root"])."/web/index.html");
|
| | |
| | | $rewrite_rules[] = array( 'rewrite_domain' => $data["new"]["domain"],
|
| | | 'rewrite_type' => $data["new"]["redirect_type"],
|
| | | 'rewrite_target' => $data["new"]["redirect_path"]);
|
| | | |
| | | switch($data["new"]["subdomain"]) {
|
| | | case 'www':
|
| | | $rewrite_rules[] = array( 'rewrite_domain' => 'www.'.$data["new"]["domain"],
|
| | | 'rewrite_type' => $data["new"]["redirect_type"],
|
| | | 'rewrite_target' => $data["new"]["redirect_path"]);
|
| | | break;
|
| | | case '*':
|
| | | // TODO
|
| | | //$rewrite_rules[] = array( 'rewrite_domain' => '*'.$alias["domain"],
|
| | | // 'rewrite_type' => $alias["redirect_type"],
|
| | | // 'rewrite_target' => $alias["redirect_path"]);
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | | // get alias domains (co-domains and subdomains)
|
| | |
| | | $rewrite_rules[] = array( 'rewrite_domain' => $alias["domain"],
|
| | | 'rewrite_type' => $alias["redirect_type"],
|
| | | 'rewrite_target' => $alias["redirect_path"]);
|
| | | switch($alias["subdomain"]) {
|
| | | case 'www':
|
| | | $rewrite_rules[] = array( 'rewrite_domain' => 'www.'.$alias["domain"],
|
| | | 'rewrite_type' => $alias["redirect_type"],
|
| | | 'rewrite_target' => $alias["redirect_path"]);
|
| | | break;
|
| | | case '*':
|
| | | // TODO
|
| | | //$rewrite_rules[] = array( 'rewrite_domain' => '*'.$alias["domain"],
|
| | | // 'rewrite_type' => $alias["redirect_type"],
|
| | | // 'rewrite_target' => $alias["redirect_path"]);
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|