# Enable Apache rewrite engine (required for RewriteRule and RewriteCond)
RewriteEngine On

# Use /404.html as the custom 404 error page
ErrorDocument 404 /404.html

# Disable directory listing for folders without an index file
# Prevents visitors from viewing file and folder contents
Options -Indexes

# Disable Apache MultiViews feature
# Prevents Apache from automatically matching similar filenames
# and avoids conflicts with URL rewrite rules
<IfModule mod_negotiation.c>
    Options -MultiViews
</IfModule>

# Skip all rewrite rules for Google verification files
# This ensures Google can access the file directly
RewriteCond %{REQUEST_URI} ^/google.*\.html$ [NC]
RewriteRule ^ - [L]
