Implementing login redirection when using file/folder URLs.