When a user types in a URL that lacks a trailing / phab will send a 302 redirect to the URL with the /.
My installation uses a custom port and during the redirect the port is removed (and so defaults to 80).
A relatively recent version of the HTTP spec now allows relative URLs in 302 redirects but if you don't want that it should at least use the correct absolute url.
Steps to reproduce:
- type in a phab url including a custom port: https://phab.mycompany.com:8001/w - note the missing trailing /
- I am redirected to https://phab.mycompany.com/w/ without my custom port and the connection is refused by the host