Skip to content

Commit 0ea0630

Browse files
committed
Change path in .htaccess file for stats when the client has been changed.
1 parent 5bebbcb commit 0ea0630

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/plugins-available/apache2_plugin.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,7 @@ function update($event_name,$data) {
756756
}
757757

758758
//* Create .htaccess and .htpasswd file for website statistics
759-
if(!is_file($data["new"]["document_root"].'/web/stats/.htaccess')) {
759+
if(!is_file($data["new"]["document_root"].'/web/stats/.htaccess') or $data["old"]["document_root"] != $data["new"]["document_root"]) {
760760
if(!is_dir($data["new"]["document_root"].'/web/stats')) mkdir($data["new"]["document_root"].'/web/stats');
761761
$ht_file = "AuthType Basic\nAuthName \"Members Only\"\nAuthUserFile ".$data["new"]["document_root"]."/.htpasswd_stats\n<limit GET PUT POST>\nrequire valid-user\n</limit>";
762762
file_put_contents($data["new"]["document_root"].'/web/stats/.htaccess',$ht_file);

0 commit comments

Comments
 (0)