使用 HELICON ISAPI 重写 & ASP.Net MVC - Url 重定向

Using HELICON ISAPI Rewrite & ASP.Net MVC - Url Redirection

我正在使用 IIS 和 HELICON ISAPI 重写。

我的要求: 将 1 个市场特定站点重定向到新域。

例如:www.example.com/anz -> www.example2.com/anz(应该重定向)
www.example.com/deu -> www.example.com/deu(不应重定向)

我试过:

RewriteCond %{HTTP_HOST} ^example.com [NC]

重写规则 ^(.*)$ https://example2.com/$1 [L,R=302]

它重定向,但两个市场。

再次与

RewriteCond %{HTTP_HOST} ^示例。com/anz [NC]

重写规则 ^(.*)$ www.example2.com/anz/$1 [L,R=302]

重定向失败。

再次使用转义序列字符

RewriteCond %{HTTP_HOST} ^example.com\/anz [NC]

重写规则 ^(.*)$ https://example2.com/anz/$1 [L,R=302]

重定向失败。

请帮助我。

请尝试:

RewriteCond %{HTTP_HOST} ^(www\.)?example.com [NC]    
RewriteRule ^/?(anz.*)$ https\://www.example2.com/ [L,R=302]