Skip to content

Commit 05dc0cc

Browse files
committed
Updated htaccess generator code to be "Apache >= 2.4" compatible
1 parent 472e763 commit 05dc0cc

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/phpFastCache/Core/Pool/IO/IOHelperTrait.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,9 +223,13 @@ protected function htaccessGen($path, $create = true)
223223
if (!file_exists($path . "/.htaccess")) {
224224
$content = <<<HTACCESS
225225
### This .htaccess is auto-generated by PhpFastCache ###
226-
order deny, allow
227-
deny from all
228-
allow from 127.0.0.1
226+
<IfModule mod_authz_host>
227+
Require all denied
228+
</IfModule>
229+
<IfModule !mod_authz_host>
230+
Order Allow,Deny
231+
Deny from all
232+
</IfModule>
229233
HTACCESS;
230234

231235
$file = @fopen($path . '/.htaccess', 'w+');

0 commit comments

Comments
 (0)