RewriteEngine On

# If the request is for root '/', forward to /frontend/index.php
RewriteCond %{REQUEST_URI} ^/$
RewriteRule ^$ /frontend/index.php [L]

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