aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2023-07-10 22:15:42 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2023-07-10 22:15:42 -0700
commit0a9e2f39c2c12a19b7c906ee03ccfdf70c9c5e64 (patch)
tree4da98715e52b152198e769b153368e09e99016cd
parentMerge remote-tracking branch 'origin/master' into bugstest (diff)
parentdata/cached: set headers for bots (diff)
downloadbugzilla-bugstest.tar.gz
bugzilla-bugstest.tar.bz2
bugzilla-bugstest.zip
Merge branch 'custom_buglist_htaccess' into bugstestbugstest
-rw-r--r--data/cached/.htaccess36
1 files changed, 36 insertions, 0 deletions
diff --git a/data/cached/.htaccess b/data/cached/.htaccess
new file mode 100644
index 000000000..2c6fb2495
--- /dev/null
+++ b/data/cached/.htaccess
@@ -0,0 +1,36 @@
+# Allow access to .html/.htmlgz/.json/.yaml/.csv files
+<FilesMatch \.(html|htmlgz|json|yaml|csv)?$>
+ # These pages are very large and change a lot, they should be followed, but
+ # not indexed themselves. Ideally we should generate better sitemaps as well,
+ # with only the bugs that are changing.
+ # https://developers.google.com/search/docs/crawling-indexing/robots-meta-tag#apache_1
+ Header set X-Robots-Tag "noindex,follow"
+
+ # Set access
+ <IfModule mod_version.c>
+ <IfVersion < 2.4>
+ Allow from all
+ </IfVersion>
+ <IfVersion >= 2.4>
+ Require all granted
+ </IfVersion>
+ </IfModule>
+ <IfModule !mod_version.c>
+ Allow from all
+ </IfModule>
+
+</FilesMatch>
+
+# This is for files that don't match.
+# And no directory listings, either.
+<IfModule mod_version.c>
+ <IfVersion < 2.4>
+ Deny from all
+ </IfVersion>
+ <IfVersion >= 2.4>
+ Require all denied
+ </IfVersion>
+</IfModule>
+<IfModule !mod_version.c>
+ Deny from all
+</IfModule>