We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5bebbcb commit 0ea0630Copy full SHA for 0ea0630
1 file changed
server/plugins-available/apache2_plugin.inc.php
@@ -756,7 +756,7 @@ function update($event_name,$data) {
756
}
757
758
//* Create .htaccess and .htpasswd file for website statistics
759
- if(!is_file($data["new"]["document_root"].'/web/stats/.htaccess')) {
+ if(!is_file($data["new"]["document_root"].'/web/stats/.htaccess') or $data["old"]["document_root"] != $data["new"]["document_root"]) {
760
if(!is_dir($data["new"]["document_root"].'/web/stats')) mkdir($data["new"]["document_root"].'/web/stats');
761
$ht_file = "AuthType Basic\nAuthName \"Members Only\"\nAuthUserFile ".$data["new"]["document_root"]."/.htpasswd_stats\n<limit GET PUT POST>\nrequire valid-user\n</limit>";
762
file_put_contents($data["new"]["document_root"].'/web/stats/.htaccess',$ht_file);
0 commit comments