# Prevent directory listings
Options -Indexes

# Block access to hidden files
<Files .*>
    Order Deny,Allow
    Deny from all
</Files>

# Block access to configuration files
<Files ~ "^.*\.([Hh][Tt][Aa])">
    Order allow,deny
    Deny from all
    Satisfy All
</Files>

# Block access to logs
<Files ~ "^.*\.([Ll][Oo][Gg])">
    Order allow,deny
    Deny from all
    Satisfy All
</Files>

# Allow access to index.php in the public directory
<Files index.php>
    Order allow,deny
    Allow from all
</Files>
