Welcome! Log In Create A New Profile

Advanced

Rewrite /index.html to /

November 07, 2011 12:34AM
Developing static files on the local filesystem I use index.html instead of / for the home page.
When I push them to the remote server I want http://domain.com/index.html to be redirected to http://domain.com/ for SEO reasons.
I've Googled but the best I seem to be able to achieve is a redirect loop. What do I need to do?

Here are my failed rules :

# rewrite ^index.html$ $scheme://domain.com/ permanent;
# rewrite /index.html $scheme://domain.com/ permanent;
# location = /index.html {
# rewrite ^(.*) $scheme://domain.com/ permanent;
# }

Thanks.
Subject Author Posted

Rewrite /index.html to /

Mark November 07, 2011 12:34AM

Re: Rewrite /index.html to /

Igor Sysoev November 07, 2011 02:26AM

Re: Rewrite /index.html to /

Mark November 07, 2011 06:33AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 260
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready