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

Fix Page Cache Compatibility Mode #40

Merged
merged 1 commit into from
Sep 2, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions lib/W3/PgCacheAdminEnvironment.php
Original file line number Diff line number Diff line change
Expand Up @@ -1141,11 +1141,23 @@ 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 .= " <IfModule mod_authz_host.c>\n";
$rules .= " Require all granted\n";
$rules .= " <IfModule mod_version.c>\n";
$rules .= " <IfVersion < 2.4>\n";
$rules .= " Order Allow,Deny\n";
$rules .= " Allow from All\n";
$rules .= " </IfVersion>\n";
$rules .= " <IfVersion >= 2.4>\n";
$rules .= " Require all granted\n";
$rules .= " </IfVersion>\n";
$rules .= " </IfModule>\n";
$rules .= " <IfModule !mod_authz_host.c>\n";
$rules .= " Allow from all\n";
$rules .= " <IfModule !mod_version.c>\n";
$rules .= " <IfModule !mod_authz_core.c>\n";
$rules .= " Order Allow,Deny\n";
$rules .= " Allow from All\n";
$rules .= " </IfModule>\n";
$rules .= " <IfModule mod_authz_core.c>\n";
$rules .= " Require all granted\n";
$rules .= " </IfModule>\n";
$rules .= " </IfModule>\n";
$rules .= "</Files>\n";

Expand Down