diff --git a/source/redirect/base.ts b/source/redirect/base.ts index ec03ac3..0b75f86 100644 --- a/source/redirect/base.ts +++ b/source/redirect/base.ts @@ -26,7 +26,10 @@ export abstract class Redirect

{ public isMatch(url: URL): boolean { if (this.parameters.matcherType === 'hostname') { - return url.hostname === this.parameters.toMatch; + const hostname = url.hostname.startsWith('www.') + ? url.hostname.slice(4) + : url.hostname; + return hostname === this.parameters.toMatch; } return false;