Rewrite /index.html to /

Mark nginx-forum at
Mon Nov 7 05:34:13 UTC 2011

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 to be redirected to 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:// permanent;
#  rewrite /index.html $scheme:// permanent;
#  location = /index.html {
#    rewrite ^(.*) $scheme:// permanent;
#  }


Posted at Nginx Forum:,217899,217899#msg-217899

More information about the nginx mailing list