OSDN Git Service

BugTrack/2568 Avoid notice error
[pukiwiki/pukiwiki.git] / .htaccess
index d521752..40f2e3e 100644 (file)
--- a/.htaccess
+++ b/.htaccess
@@ -1,4 +1,39 @@
-<FilesMatch \.(?i:ini\.php|lng|txt|gz|tgz)$>
-       Order allow,deny
-       Deny from all
+# Apache .htaccess for PukiWiki
+#
+# Copyright
+#   2002-2020 PukiWiki Development Team
+#   2001      Originally written by yu-ji
+# License: GPL v2 or (at your option) any later version
+#
+# NOTE: Correct permission of this file 644(or 604)
+
+## Access control by Require directive
+## needs 'AllowOverride Limit' at httpd.conf
+
+# Prohibit direct access to .htaccess, .htpasswd or others
+# (If it's not set by default)
+#<FilesMatch "^\.ht">
+#  Require all denied
+#</FilesMatch>
+
+# Prohibit direct access
+<FilesMatch "\.(ini\.php|lng\.php|txt|gz|tgz|zip)$">
+  Require all denied
 </FilesMatch>
+
+## Authentication to this directory with basic-auth
+## needs 'AllowOverride AuthConfig' at httpd.conf
+#AuthType Basic
+#AuthName      "Authentication required"
+#AuthUserFile  /path/to/.htpasswd
+#AuthGroupFile /dev/null
+#Require       valid-user
+
+## Using zlib.output_compression per directory (via .htaccess)
+## needs 'AllowOverride Options' at httpd.conf
+##
+## NOTE:
+##   Define PKWK_ZLIB_LOADABLE_MODULE somewhere if you are using
+##   PHP extension as loadable module (especially FreeBSD ports)
+##   (See BugTrack/738 for detail)
+#php_flag zlib.output_compression On