From 8039e8073a6e0c6a07d5b2824c8a5c28250cd0a3 Mon Sep 17 00:00:00 2001 From: Daniel Maier Date: Fri, 21 Oct 2022 16:03:38 +0200 Subject: [PATCH] fix from and to host validation --- src/ApacheModRewriteGenerator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ApacheModRewriteGenerator.php b/src/ApacheModRewriteGenerator.php index 1eeb2de..fd88773 100644 --- a/src/ApacheModRewriteGenerator.php +++ b/src/ApacheModRewriteGenerator.php @@ -42,7 +42,7 @@ public function generateRewrite( string $from, string $to, int $type ) : string $output = ''; - if( !$fromHost && $toHost ) { + if( $fromHost && !$toHost ) { throw new AmbiguousRelativeHostException( 'Unclear relative host. When the "FROM" URI specifies a HOST the "TO" MUST specify a HOST as well.' );