Posted By

jessibird on 08/14/10


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite


redirect index.htm and index.html to root

 / Published in: Apache

For WordPress, put this code at the top of your .htaccess file. Make sure it's above the WordPress-generated rewrite section.

  1. RewriteEngine On
  2. RewriteBase /
  3. RewriteRule ^index\.html?$ / [NC,R,L]

Report this snippet  


RSS Icon Subscribe to comments
Posted By: JCFreak1223 on January 21, 2011

Will this only work for Wordpress? If not, what is the modification for it work on other types of sites.

Posted By: wasimkazi on June 13, 2012

This code is working perfect for my wordpress site. Thanks a lot.


You need to login to post a comment.