Allow hosting of MM at any route like http://www.example.com/chat

Description

Related to https://github.com/mattermost/platform/issues/643
Also request from @botherder: https://twitter.com/botherder/status/655394442313138176
Voting: https://mattermost.uservoice.com/forums/306457-general/suggestions/12468372-install-mattermost-in-a-subdirectory
Forum issue: https://forum.mattermost.org/t/how-do-i-set-the-base-url-for-apache-ssl-forwarding/573

To achieve this change, the client should reference the Site URL config.json setting instead of a relative link, when one is available. If no site URL is set, then return a slash or a blank value.

Notes:
1) For someone to host Mattermost in a subdirectory, it is assumed that Site URL is required to be set.
2) This change should not break existing deployments, including those who don't have Site URL set.
3) Preliminary work from in 2016 can be found here: https://github.com/mattermost/mattermost-server/compare/master...akihikodaki:PLT-200

QA Test Steps

None

Status

Mana

8

Assignee

Unassigned

QA Assignee

Linda Mitchell

Reporter

Corey Hulen

Epic Link

None

Fix versions

Mattermost Team

None

Sprint

None

Labels

QA Testing Areas

None

GitHub Issue

None

Components

None
Configure