<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /timopdf/public/

    # Block direct access to dotfiles
    RewriteRule "(^|/)\." - [F]

    # Serve existing files/dirs directly
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]

    # Front controller
    RewriteRule ^ index.php [L]
</IfModule>

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

DirectoryIndex index.php
