<IfModule mod_rewrite.c>

    RewriteEngine On

    # ==============================
    # PASS AUTHORIZATION HEADER
    # ==============================

    RewriteCond %{HTTP:Authorization} ^(.+)$
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%1]

    # ==============================
    # REMOVE TRAILING SLASH
    # ==============================

    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} (.+)/$
    RewriteRule ^ %1 [L,R=301]

    # ==============================
    # FRONT CONTROLLER
    # ==============================

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [L]

</IfModule>

# ==============================
# PHP VERSION
# ==============================

<IfModule mime_module>
    AddHandler application/x-httpd-ea-php81 .php .php8 .phtml
</IfModule>