<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /penggajianjig/penggajian-app/

    # Block direct access to system and application directories
    RewriteRule ^(application|system|vendor)/.*$ - [F,L]

    # Remove index.php from URL
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>

<IfModule !mod_rewrite.c>
    # If mod_rewrite is not available, fall back to index.php
    ErrorDocument 404 /index.php
</IfModule>
