Only redirect to homepage url when its not the root url
It was possible to create an infi redirect when the user set up the
home_page_url
to redirect to the main URL of the gitlab instance.
This fix makes sure this redirect is not possible.
Fixes #1020 (closed)
/cc @dblessing