Compatible update for .htaccess.

This should hopefully work in Apache 2.2 and 2.4.
This commit is contained in:
Klaus Weidenbach 2015-06-21 23:58:19 +02:00
parent c1e0987b88
commit c3fa0a3ca7
3 changed files with 23 additions and 9 deletions

View file

@ -5,7 +5,13 @@ AddType audio/ogg .oga
# don't allow any web access to logfiles, even after rotation/compression
<FilesMatch "\.(out|log|gz)$">
Deny from all
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
</IfModule>
</FilesMatch>
<IfModule mod_rewrite.c>
@ -14,7 +20,6 @@ Deny from all
RewriteRule "(^|/)\.git" - [F]
RewriteRule "(^|/)store" - [F]
# Rewrite current-style URLs of the form 'index.php?q=x'.
# Also place auth information into REMOTE_USER for sites running
# in CGI mode.
@ -22,6 +27,4 @@ Deny from all
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
</IfModule>

View file

@ -1,5 +1,10 @@
Options -Indexes
# Remove the following line or modify it to run the string translator utility
Deny from all
# Remove the following lines or modify it to run the string translator utility
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
</IfModule>

View file

@ -1,3 +1,9 @@
<FilesMatch "\.tpl">
Deny from all
</FilesMatch>
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
</IfModule>
</FilesMatch>