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

ez77 nginx-forum at nginx.us
Fri Sep 10 20:51:52 MSD 2010


Thank you all for your replies. It's indeed an honor to receive help
from the very creator of nginx! Not meaning to bug any of you any
more... but this last configuration,

location / {
root /var/www/mysite;
index index.html;
}

location ~ ^(/.+/)index.html$ {
internal;
error_page 404 http://$host$1?;
}

, redirects to the root of my site: site.com/ instead of site.com/dir/.
To be precise, to site.com/? . (What's the point of that "?"?)

Thank you again,

Ezequiel

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




More information about the nginx mailing list