headstartwp icon indicating copy to clipboard operation
headstartwp copied to clipboard

Support redirect of www to non-www and vice versa as part of config

Open chriseagle opened this issue 1 year ago • 0 comments

Is your enhancement related to a problem? Please describe.

Would like to suggest adding support for this to HeadStart config with a new key/value for redirectWww | redirectNonWww .

On previous projects within the same repo, individual stakeholders required different handling of this, adding as a config option would remove the ambiguity of the approach (middleware vs next.config).

Approach would be to extend withHeadstartWPConfig in a similar way to the extension for rewrite support and check via the host header of the request.

See https://github.com/10up/headstartwp/compare/develop...add-www-redirect-to-config as draft PR handling www to non-www.

cc @lucymtc

Designs

No response

Describe alternatives you've considered

No response

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

chriseagle avatar Nov 22 '23 17:11 chriseagle