This PR modifies the way we do a domain redirect. The existing functionality is to supply only a hostname to redirect to, as a String property. The change requires configuring forceDomain to be an object containing hostname, port and redirect type (now also a number rather than a string).
The default is an empty hostname, effectively disabling the functionality.
default: {
hostname: '',
port: 80,
type: 301
}
Example
To redirect to example.com from www.example.comtemporarily you could configure it thus:
This PR modifies the way we do a domain redirect. The existing functionality is to supply only a hostname to redirect to, as a String property. The change requires configuring forceDomain to be an object containing hostname, port and redirect type (now also a number rather than a string).
The default is an empty hostname, effectively disabling the functionality.
Example
To redirect to
example.com
fromwww.example.com
temporarily you could configure it thus:Close #271