# GowellFleet - public/.htaccess

# Disable directory listing
Options -Indexes

# Hide sensitive files
<FilesMatch "^(\.env|composer\.(json|lock)|README\.md)$">
    Require all denied
</FilesMatch>

<IfModule mod_rewrite.c>
    RewriteEngine On

    # Uncomment if the app lives in a subfolder and rewrites misbehave:
    # RewriteBase /gowellfleet/public/

    # Send everything that isn't a real file or directory to index.php
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^ index.php [L]
</IfModule>

# Sensible default security headers (Apache-level backup to PHP headers)
<IfModule mod_headers.c>
    Header set X-Content-Type-Options "nosniff"
    Header set X-Frame-Options "SAMEORIGIN"
    Header set Referrer-Policy "strict-origin-when-cross-origin"
</IfModule>
