<IfModule mod_rewrite.c>
    Options -MultiViews
    RewriteEngine On

    RewriteCond %{THE_REQUEST} \s/+(.*/)?index\.php[\s?] [NC]
    RewriteRule ^(.*)index\.php$ $1 [R=301,L]

    # ============================================================
    # INSTALLATION WIZARD
    # ============================================================
    # The physical installer folder is located at project root:
    # ../installation/
    #
    # Public requests:
    # /installation
    # /installation/
    # /installation/assets/...
    #
    # are internally served from ../installation/.
    RewriteRule ^installation/?$ ../installation/index.php [L,QSA]

    RewriteRule ^installation/(.*)$ ../installation/$1 [L,QSA]

    # ============================================================
    # NORMAL APPLICATION ROUTING
    # ============================================================
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]

    RewriteRule ^(.+)$ index.php?route=$1 [L,QSA]
    RewriteRule ^$ index.php [L]
</IfModule>