aboutsummaryrefslogtreecommitdiffstats
path: root/build/htaccess-checker.php
diff options
context:
space:
mode:
Diffstat (limited to 'build/htaccess-checker.php')
-rw-r--r--build/htaccess-checker.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/build/htaccess-checker.php b/build/htaccess-checker.php
new file mode 100644
index 00000000000..963b3edb34b
--- /dev/null
+++ b/build/htaccess-checker.php
@@ -0,0 +1,20 @@
+<?php
+
+declare(strict_types=1);
+/**
+ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+
+/**
+ * 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);
+}