Options +FollowSymLinks RewriteCond %{THE_REQUEST} ^.*/index.php RewriteRule ^(.*)index.php$ https://www.YOURSITE.com/$1 [R=301,L]