DirectoryIndex index.php

<IfModule mod_rewrite.c>
    RewriteEngine On

    # Protect hidden files and folders.
    RewriteRule "(^|/)\." - [F,L]

    # Public crawler endpoints.
    RewriteRule ^robots\.txt$ robots.php [L]
    RewriteRule ^sitemap\.xml$ sitemap.php [L]

    # Stop the front controller from being rewritten again.
    RewriteRule ^index\.php$ - [L]

    # Serve real files and directories, including admin and installer.
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]

    # Relative substitution works at the domain root and in a subfolder.
    RewriteRule ^ index.php [L,QSA]
</IfModule>
