I need to strip /index.php part from my url That is if someone opens my url http://www.mysite.com/index.php it should redirect to http://www.mysite.com/ How do i do this? Thanks in advance
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/ RewriteRule ^index\.php$ http://www.site.com [R=301,L] Code (markup):
Make sure that that none of the links within your site point to "/index.php" - always use "/" instad. Then you won't need to worry about it.
RewriteCond %{ENV:REDIRECT_STATUS} ^$ RewriteRule ^index\.php$ / [R=301,L] RewriteRule ^(.+)\.html$ /$1.php [R=301,L] Code (markup): That should work.