1
0

htaccess-checker.php 451 B

123456789101112131415161718
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-License-Identifier: AGPL-3.0-or-later
  5. */
  6. /**
  7. * Script to check that the main .htaccess file doesn't include some automated
  8. * changes done by Nextcloud.
  9. */
  10. $htaccess = file_get_contents(__DIR__ . '/../.htaccess');
  11. if (strpos($htaccess, 'DO NOT CHANGE ANYTHING') !== false) {
  12. echo(".htaccess file has invalid changes!\n");
  13. exit(1);
  14. } else {
  15. exit(0);
  16. }