Redirect Index.html to root
2 posts
• Page 1 of 1
Redirect Index.html to root
Hello,
My default page for the website into IIS is index.html.
When people are on root, http://www.domain.com, i need people don't see the index.html
So i need to redirect http://www.domain.com/index.html to http://www.domain.com
When i try to create a rule for it, i have got an error for infinite loop.
Could you help me to create the good redirection rule ?
Thks a lot
BR
Patrice
My default page for the website into IIS is index.html.
When people are on root, http://www.domain.com, i need people don't see the index.html
So i need to redirect http://www.domain.com/index.html to http://www.domain.com
When i try to create a rule for it, i have got an error for infinite loop.
Could you help me to create the good redirection rule ?
Thks a lot
BR
Patrice
Re: Redirect Index.html to root
Hello Patrice,
Please try the following config:
RewriteBase /
RewriteRule ^/?$ /index.html [L]
RewriteRule ^index.html$ / [NC,R=301,NS,L]
Please try the following config:
RewriteBase /
RewriteRule ^/?$ /index.html [L]
RewriteRule ^index.html$ / [NC,R=301,NS,L]
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 20 guests