<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /

    # Rewrite asset paths to their location within /urus
    RewriteRule ^dist/(.*)$ urus/dist/$1 [L]
    RewriteRule ^assets/(.*)$ assets/$1 [L]

    # Applicant portal front controller for base path
    RewriteRule ^pemohon/?$ pemohon/index.php [L,QSA]
    # Admin portal front controller for base path
    RewriteRule ^urus/?$ urus/index.php [L,QSA]

    # Serve existing files and directories normally
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]

    # Route everything else through the application front controller
    RewriteRule ^ urus/index.php [L]
</IfModule>

DirectoryIndex urus/index.php pemohon/index.php index.php

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php81” package as the default “PHP” programming language.
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php81 .php .php8 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
