URL rewriting and alias domains - rebrandly/rebrandly-express Wiki
Consider a valid URL:
During a redirection via Rebrandly aliasing,
the domain name part (in the image, it is
has to be replaced by the alias domain.
Rebrandly will setup and provide a custom alias domain for the branded domain. If your web server is running under "acme.com", you can add "acme.com" to your Rebrandly account, and Rebrandly will generate an alias for it (a subdomain of rebrandly.cc domain name). An alias comes similar to this: xxxxxxxx.rebrandly.cc.
The middleware will then re-write the incoming HTTP request:
- Replace the domain name with the alias domain
- Enforce HTTPS protocol (force port 443 if any other port was specified)
- Preserve all other URL components (except URL Fragment/Anchor, which is not available on server side) so that they make appearance in the rewritten URL
and will return the client a HTTP 302 Response (Temporary Redirect) having as Location header the rewritten URL.