Beginner's question: redirecting /dir/index.html to /dir/

Igor Sysoev igor at
Sun Sep 12 22:09:51 MSD 2010

On Sun, Sep 12, 2010 at 12:13:11PM -0400, ez77 wrote:

> > rewrite ^(.*/)index.html http://$host$1 permanent;
> Hi Mat,
> I like your proposal better, which looks more elegant without the if
> clause, but I don't know where to include it. Under location / I get a
> redirect loop.

You should set it on server level.

Igor Sysoev

More information about the nginx mailing list