Fix redirect loop when index file serving disabled

fixes #18