I know how to redirect domain.com/index.php to domain.com using this code: RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/ RewriteRule ^index\.php$ http://www.domain.com/ [R=301,L] Code (markup): But how do I make it redirect domain.com/index.php/anything/ to domain.com ? Thanks in advance.
Its alright I solved it myself through a combination of trial and error and educated guesses. It works apart from it can't redirect to domain.com if there is a ? in the URL somewhere. Anyway, the code if anyone is interested or found this through search is: RewriteEngine On RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php(.*)\ HTTP/ RewriteRule ^index\.php(.*)$ http://www.domain.com/ [R=301,L] Code (markup):