Return to Snippet

Revision: 72635
at October 3, 2017 05:56 by apphp-snippets

Initial Code
# Prevent viewing of a specific file
<files file.jpg>
        Order allow,deny
        Deny from all
# Prevent access to multiple file types
<FilesMatch "\.(htaccess|htpasswd|ini|phps|fla|psd)$">
        Order Allow,Deny
        Deny from all

Initial URL

Initial Description
This example shows you how to restrict to a specific file or multiple files. Add the following code block and edit the file name/s according to yuor needs.

Initial Title
Prevent Access to a Specific File/s in .htaccess

Initial Tags
file, htaccess

Initial Language