apache rewrite index.php with trailing /
I had a wordpress site installed on one of my domains. I decided to delete it and create a new custom site.
However in my logs I see visits to old wordpress site urls, that no longer exist.
the visits are to pages similar two the following
http://betbusters.net/index.php/blog (notice the trailing slash after index.php)
These pages do not give a 404, as the index.php page exists. However the trailing / after index.php gives very strange results to the page.
Is there a way to rewrite index.php/title/title2 to plain index.php ? (Please note that I will be using links like index.php?variable=5&something=10)
You can use this rule as very first rule in your root .htaccess:
RewriteRule ^(index\.php)/ /$1 [L,NC,R=301]