Redirect loop if repo URL has `.git/` on the end
Zendesk issue: https://gitlab.zendesk.com/agent/tickets/14498
The following 3 URLs work to access a project:
- https://gitlab.com/gitlab-org/gitlab-ce
- https://gitlab.com/gitlab-org/gitlab-ce/
- https://gitlab.com/gitlab-org/gitlab-ce.git
However, the following results in an endless redirect
cc/ @rdavila Can you take a look, please?