redirect index.htm and index.html to root

/ Published in: Apache
Save to your folder(s)

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

Copy this code and paste it in your HTML
  1. RewriteEngine On
  2. RewriteBase /
  3. RewriteRule ^index\.html?$ / [NC,R,L]

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.