From 1c711c8e544d7d0f62d73c0d8367fa709b59cfce Mon Sep 17 00:00:00 2001 From: latham <latham@ispconfig3> Date: Thu, 19 May 2011 10:57:54 -0400 Subject: [PATCH] Syncing from our internal branch. This adds safe default favicon.ico which is blank, a simple .htaccess, and a simple robots.txt. This will also reduce 404s on the whole server --- server/conf/index/.htaccess | 1 + server/plugins-available/apache2_plugin.inc.php | 5 ++++- server/conf/index/robots.txt | 2 ++ server/conf/index/favicon.ico | 0 4 files changed, 7 insertions(+), 1 deletions(-) diff --git a/server/conf/index/.htaccess b/server/conf/index/.htaccess new file mode 100644 index 0000000..a5cff82 --- /dev/null +++ b/server/conf/index/.htaccess @@ -0,0 +1 @@ +## Default .htaccess file diff --git a/server/conf/index/favicon.ico b/server/conf/index/favicon.ico new file mode 100644 index 0000000..7a6c687 --- /dev/null +++ b/server/conf/index/favicon.ico Binary files differ diff --git a/server/conf/index/robots.txt b/server/conf/index/robots.txt new file mode 100644 index 0000000..eb05362 --- /dev/null +++ b/server/conf/index/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index 5011d5f..4868e28 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -441,6 +441,9 @@ // copy the standard index page 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'); + if(is_file('/usr/local/ispconfig/server/conf-custom/index/favicon.ico')) exec('cp /usr/local/ispconfig/server/conf-custom/index/favicon.ico '.escapeshellcmd($data['new']['document_root']).'/web/'); + if(is_file('/usr/local/ispconfig/server/conf-custom/index/robots.txt')) exec('cp /usr/local/ispconfig/server/conf-custom/index/robots.txt '.escapeshellcmd($data['new']['document_root']).'/web/'); + if(is_file('/usr/local/ispconfig/server/conf-custom/index/.htaccess')) exec('cp /usr/local/ispconfig/server/conf-custom/index/.htaccess '.escapeshellcmd($data['new']['document_root']).'/web/'); } else { if (file_exists('/usr/local/ispconfig/server/conf-custom/index/standard_index.html')) { @@ -1418,4 +1421,4 @@ } // end class -?> +?> \ No newline at end of file -- Gitblit v1.9.1