Skip to content

Instantly share code, notes, and snippets.

@chesio
Created May 10, 2017 12:12
Show Gist options
  • Save chesio/8f83224840eccc1e80a17fc29babadf2 to your computer and use it in GitHub Desktop.
Save chesio/8f83224840eccc1e80a17fc29babadf2 to your computer and use it in GitHub Desktop.
Locally disable execution of PHP files on Apache webserver
# Block access to php, php3, php4, php5 and phtml files
<FilesMatch "\.(?:[Pp][Hh][Pp][345]?|[Pp][Hh][Tt][Mm][Ll])$">
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
<IfModule !mod_authz_core.c>
Deny from all
</IfModule>
</FilesMatch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment