# Hospital ERP — front-controller rewrite
# Requires: Apache mod_rewrite + AllowOverride All for this directory
<IfModule mod_rewrite.c>
    RewriteEngine On
    # If the app lives at http://localhost/hospital_erp/
    RewriteBase /hospital_erp/
    # Do not rewrite real files or directories
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    # Send everything else to index.php?url=...
    RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
</IfModule>
# If mod_rewrite is unavailable, deny listing and point users to index
Options -Indexes
DirectoryIndex index.php