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

ez77 nginx-forum at nginx.us
Sun Sep 12 01:25:20 MSD 2010


> Upgrade to the lastest 0.8.50 and try
>
> location ~ ^(?.*/)index.html$ {
> internal;
> root /var/www/mysite;
> error_page 404 http://$host$DIR;
> }

Nice! It worked! Thank you very much, once again. At the risk of pushing
it... is there a way to make the redirect 301 rather than 302?

Cheers,

Ezequiel

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,128951,129575#msg-129575




More information about the nginx mailing list