Redirect index.html to root

Here is the code:

RewriteEngine On
RewriteRule ^index\.html$ / [R=301,L]
RewriteRule ^(.*)/index\.html$ /$1/ [R=301,L]

Put this code in .htaccess file

Comments

Popular posts from this blog

Google makes Rich Medical Content into Knowledge Graph

Best Practices for SEO Copywriting in 2022

Google Analytics: Multiple tracking codes on web pages