<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /

    # Exclude specific file types and directories from the rewrite
    RewriteCond %{REQUEST_URI} !\.(jpg|jpeg|png|gif|css|js|ico|svg|woff|woff2|ttf)$
    RewriteCond %{REQUEST_URI} !^/(images/|media/|css/|js/)

    # Exclude existing files and directories from the rewrite
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d

    # Rewrite all other requests to index.php
    RewriteRule ^ index.php [L]
</IfModule>

<IfModule !mod_rewrite.c>
    FallbackResource /index.php
</IfModule>
