Skip to content
This repository has been archived by the owner on Feb 23, 2019. It is now read-only.

Commit

Permalink
Update PgCacheAdminEnvironment.php (#24)
Browse files Browse the repository at this point in the history
Apache 2.4+ has deprecated the "Allow, Deny, and Order" directives in .htaccess, in favor of "Require".  Such servers would now be required to load the "mod_access_compat" module to regain "Allow, Deny, and Order" (unlike pre-2.4).    For w3tc's "Enable Compatibility Mode" to function correctly on servers that have upgraded i've put in the appropriate module condition check.
  • Loading branch information
amiga-500 authored and nigrosimone committed Aug 18, 2016
1 parent 64cf443 commit 954b739
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/W3/PgCacheAdminEnvironment.php
Original file line number Diff line number Diff line change
Expand Up @@ -1141,7 +1141,12 @@ private function rules_cache_generate_apache($config) {

// allow to read files by apache if they are blocked at some level above
$rules .= "<Files ~ \"\.(html|html_gzip|xml|xml_gzip)$\">\n";
$rules .= " Allow from all\n";
$rules .= " <IfModule mod_authz_host.c>\n";
$rules .= " Require all granted\n";
$rules .= " </IfModule>\n";
$rules .= " <IfModule !mod_authz_host.c>\n";
$rules .= " Allow from all\n";
$rules .= " </IfModule>\n";
$rules .= "</Files>\n";

if (!$etag) {
Expand Down

0 comments on commit 954b739

Please sign in to comment.