Realm information comes in three parts:
- query param
On the server the following processing occurs:
- dns/host "rebase" the root realm
- uri appends onto the "rebased" root realm
- query param overrides everything and is based from the "real" root realm.
The XUI should let the server perform the processing to determine which realm the request is on and simply pass this information on.