Deny Access to Backup and Source Files

These files may be left by some text/HTML editors (like Vi/Vim) and pose a great security danger if exposed to the public.

<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>

Was this article helpful?

Thanks for your opinion!
Have more questions? Submit a request