Deny Access to Backup and Source Files - .htaccess

<FilesMatch "(\.(bak|config|dist|fla|inc|ini|log|psd|sh|sql|swp)|~)$"> ## Apache 2.2 Order allow,deny Deny from all Satisfy All ## Apache 2.4 # Require all denied </FilesMatch>

1 Response

These files may be left by some text/html editors (like Vi/Vim) and pose a great security danger, when anyone can access them.

Write a comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.