Skip to content
This repository has been archived by the owner on Feb 13, 2019. It is now read-only.

Commit

Permalink
Nun kann man auch https-Weiterleitungen anlegen (Michaels Patch)
Browse files Browse the repository at this point in the history
git-svn-id: file:///var/svn/trunk@40 45fdb5c4-e40b-0410-b369-9aab4fe9a275
  • Loading branch information
Florian Lippert committed Sep 26, 2004
1 parent b1f283a commit 403776e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions syscp/customer_domains.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
$completedomain_check=$db->query_first("SELECT `id`, `customerid`, `domain`, `documentroot`, `isemaildomain` FROM `".TABLE_PANEL_DOMAINS."` WHERE `domain`='$completedomain' AND `customerid`='".$userinfo['customerid']."'");

$path=addslashes($_POST['path']);
if(substr($path, 0, 7) != 'http://')
if(!preg_match('/^https?\:\/\//', $path))
{
$path=makeCorrectDir($path);
$path=$userinfo['documentroot'].$path;
Expand Down Expand Up @@ -139,7 +139,7 @@
if(isset($_POST['send']) && $_POST['send']=='send')
{
$path=addslashes($_POST['path']);
if(substr($path, 0, 7) != 'http://')
if(!preg_match('/^https?\:\/\//', $path))
{
$path=makeCorrectDir($path);
$path=$userinfo['documentroot'].$path;
Expand Down
4 changes: 2 additions & 2 deletions syscp/scripts/cronscript.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@
$result_domains=$db->query("SELECT `d`.`id`, `d`.`domain`, `d`.`customerid`, `d`.`documentroot`, `d`.`parentdomainid`, `d`.`isemaildomain`, `d`.`iswildcarddomain`, `d`.`openbasedir`, `d`.`safemode`, `d`.`speciallogfile`, `d`.`specialsettings`, `pd`.`domain` AS `parentdomain`, `c`.`loginname`, `c`.`guid` FROM `".TABLE_PANEL_DOMAINS."` `d` LEFT JOIN `".TABLE_PANEL_CUSTOMERS."` `c` USING(`customerid`) LEFT JOIN `".TABLE_PANEL_DOMAINS."` `pd` ON(`pd`.`id` = `d`.`parentdomainid`) WHERE `d`.`deactivated` <> '1' ORDER BY `d`.`domain` ASC");
while($domain=$db->fetch_array($result_domains))
{
$domain['documentroot'] = makeCorrectDir ($domain['documentroot']);
$vhosts_file.='# Domain ID: '.$domain['id'].' - CustomerID: '.$domain['customerid'].' - CustomerLogin: '.$domain['loginname']."\n";
$vhosts_file.='<VirtualHost '.$settings['system']['ipaddress'].'>'."\n";
$vhosts_file.=' ServerName '.$domain['domain']."\n";
Expand All @@ -130,12 +129,13 @@
$vhosts_file.=' ServerAlias '.$alias.'.'.$domain['domain']."\n";
$vhosts_file.=' ServerAdmin webmaster@'.$domain['domain']."\n";

if(substr($domain['documentroot'], 0, 7) == 'http://')
if(preg_match('/^https?\:\/\//', $domain['documentroot']))
{
$vhosts_file.=' Redirect / '.$domain['documentroot']."\n";
}
else
{
$domain['documentroot'] = makeCorrectDir ($domain['documentroot']);
$vhosts_file.=' DocumentRoot '.$domain['documentroot']."\n";
if($domain['openbasedir'] == '1')
{
Expand Down

0 comments on commit 403776e

Please sign in to comment.