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.' );