<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /nis_ams/
    
    # If the request is not for a valid file
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    # Rewrite to index.php
    RewriteRule ^(.*)$ index.php [L,QSA]
</IfModule>