RewriteEngine On
RewriteBase /lead-management/public/

# Allow direct access to files and directories that exist
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]

# Redirect everything else to index.php
RewriteRule ^(.*)$ index.php [QSA,L]