I was using this code in htaccess to strip any directory to index.php
RewriteRule ^.(index.+?\.php)$ /$1 [L,NC,R=301]
For instance
http://www.example.com/toys/index.php
http://www.example.com/battery/upload/index.php
http://www.example.com/xyz/photos/index.php
It was changing redirecting all of them to
http://www.example.com/index.php
Now when i changed my server - this code is causing 404 pages Is there any alternate modification which can be advised to remodify the code so as to strip any line or directory after domain and before index.php
To create exception for
administrator
folder you can do: