How to redirect domain.com/index.php to domain.com using .htaccess
Posted by Vincent Isles at Tuesday, March 03, 2009RewriteCond %{THE_REQUEST} ^[^/]*/index\.php [NC]
RewriteRule (.*)index\.php(.*) $1$2 [R,L]
If you want to redirect index.html as well, you can have
RewriteCond %{THE_REQUEST} ^[^/]*/index\.html [NC]
RewriteRule (.*)index\.php(.*) $1$2 [R,L]
Labels: .htaccess
Subscribe to:
Post Comments (Atom)


You rock man this work for me. I have been googling for more than 2 hours and blessing in disguise I found your post simple and straightforward.
Just an additional questions, what if redirect from domain.com/index.php to http://www.domain.com