2016-11-02 15:11:30 -04:00
|
|
|
<?php
|
2025-02-21 06:12:29 -05:00
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
2016-11-02 15:11:30 -04:00
|
|
|
/**
|
2024-05-10 09:09:14 -04:00
|
|
|
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2016-11-02 15:11:30 -04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Script to check that the main .htaccess file doesn't include some automated
|
|
|
|
|
* changes done by Nextcloud.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
$htaccess = file_get_contents(__DIR__ . '/../.htaccess');
|
|
|
|
|
if (strpos($htaccess, 'DO NOT CHANGE ANYTHING') !== false) {
|
|
|
|
|
echo(".htaccess file has invalid changes!\n");
|
|
|
|
|
exit(1);
|
|
|
|
|
} else {
|
|
|
|
|
exit(0);
|
|
|
|
|
}
|