Removing index.php from URL even after .htaccess updates?
There's nothing unique or special for doing this with Craft CMS - you should be able to use this method for just about any web app running in a LAMP stack. See this post on removing index.php from the URL with Apache/mod_rewrite/.htaccess.

TLDR: add this bit to the end of your .htaccess file before the closing  tag.

If Craft's index.php is at the domain root, such as example.com/index.php, this should do it:

# Redirect to same url without index.php
RewriteCond %{THE_REQUEST} ^GET./index\.php(/.*)?$ [NC]
RewriteCond %{REQUEST_URI} !^/index\.php/admin\b [NC]
RewriteRule ^index\.php(/(.*))?$ /$2 [R=302,NE,L]


If it lives in a subfolder, do this instead:

# Redirect to same url without index.php
RewriteCond %{THE_REQUEST} ^GET./subfolder/index\.php(/.*)?$ [NC]
RewriteCond %{REQUEST_URI} !^/subfolder/index\.php/admin\b [NC]
RewriteRule ^subfolder/index\.php(/(.*))?$ /$2 [R=302,NE,L]


(In both examples, replace admin on the 2nd line with whatever your site’s CP trigger is set to, if you’ve changed it.)