# Disable directory listing
Options -Indexes

<IfModule mod_rewrite.c>
  RewriteEngine On

  # Allow direct access to update.php
  RewriteCond %{REQUEST_URI} ^/update\.php$ [NC]
  RewriteRule ^ - [L]

  # Route all other requests through index.php
  RewriteRule ^.*$ index.php [L,QSA]
</IfModule>