Blocking specific extensions in htaccess

.htaccess, apache

Solution

Try this:

<Files "*.json">
    Order Deny,Allow
    Deny from all
</Files>

Problem

I have a directory with files like: ``` /files/archive.01.json /files/archive.02.json /files/archive.03.json /files/hello.php ``` I need the .htaccess to block access to all .json files in that directory. Any ideas?

Original source