correct url formatting for redirecting to index.html when browsing a directory.