RewriteEngine On
RewriteBase /

# 1. Immediately drop all Apple Touch Icons and Favicon variants with 204 No Content
RewriteRule ^(apple-touch-icon.*|favicon.*|browserconfig\.xml|robots\.txt|site\.webmanifest)$ - [R=204,L]

# 2. Allow direct access to real existing files and folders (e.g. admin.php, visitors.php, db.php)
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]

# 3. Route all other requests to index.php
RewriteRule ^(.*)$ index.php [L,QSA]