fixes #4520 Vanity URLs redirect to a directory name fail
Merge pull request #4586 from dotCMS/issue-4520-vanity-URLs-redirect-to-a-directory-name-fail

fixes #4520 Vanity URLs redirect to a directory name fail