<IfModule mod_rewrite.c>
RewriteEngine On

# Ensure index.php is the directory index
DirectoryIndex index.php

# If your app is served from a subdirectory, set RewriteBase accordingly
RewriteBase /hms_project/admin/

# If the request is not a real file or directory, route to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [QSA,L]
</IfModule>
