RewriteEngine On RewriteBase / # Keep real assets accessible and route application requests through the front controller. RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] RewriteRule ^ index.php [L] # Never expose environment/config/database files through Apache. Require all denied