htaccess redirect index.html to index.php for domain root only

13,928

Solution 1

That rule is probably a bit over-complicated for what you're doing.

You only need:

RewriteRule ^index.html$ /index.php [R,L]

Solution 2

Try this. It work's in my case.

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

Visit: https://css-tricks.com/how-to-redirect-indexhtml-to-indexphp/

Share:
13,928
D3Systems
Author by

D3Systems

Updated on July 23, 2022

Comments