Skip to content

Commit 1c711c8

Browse files
author
latham
committed
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
1 parent 3b8514a commit 1c711c8

File tree

4 files changed

+7
-1
lines changed

4 files changed

+7
-1
lines changed

server/conf/index/.htaccess

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
## Default .htaccess file

server/conf/index/favicon.ico

7.19 KB
Binary file not shown.

server/conf/index/robots.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
User-agent: *
2+
Disallow:

server/plugins-available/apache2_plugin.inc.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,9 @@ function update($event_name,$data) {
441441
// copy the standard index page
442442
if (file_exists('/usr/local/ispconfig/server/conf-custom/index/standard_index.html_'.substr(escapeshellcmd($conf['language']),0,2))) {
443443
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');
444+
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/');
445+
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/');
446+
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/');
444447
}
445448
else {
446449
if (file_exists('/usr/local/ispconfig/server/conf-custom/index/standard_index.html')) {
@@ -1418,4 +1421,4 @@ private function _checkTcp ($host,$port) {
14181421

14191422
} // end class
14201423

1421-
?>
1424+
?>

0 commit comments

Comments
 (0)