I am trying to rewrite my URL's, but hit a stumbling block.
The URL's are like so...
http://www.site.com/_One or two words [some other word or words] some more words/index.php
and using the following rewrite it alters the first bit ok but does not remove the /index.php part.
RewriteEngine on
RewriteRule ([/_])(.*)(/index.php)$ "http://www.site.com/?p=$2" [R=301,L,NC]
RewriteEngine on
RewriteRule ([/_])(.*)$ "http://www.site.com/?p=$2" [R=301,L,NC]
What is the first rewrite do I change to correctly rewrite the URL so the /index.php is removed ?