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

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 1
Joined: 24 Dec 2016, 00:40

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

24 Dec 2016, 00:49

I am using IIS and HELICON ISAPI rewrite.

My Requirement: Redirect 1 market specific sites to new domain.

ex: example.com/anz -> example2.com/anz (should redirect)
example.com/deu -> example.com/deu (should not redirect)

I tried:

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

It redirects, but both the markets.

and again with

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

failed to redirect.

and again with escape sequence character

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

failed to redirect.

Please help me.

User avatar
Posts: 402
Joined: 06 Mar 2012, 11:59

Re: Using HELICON ISAPI Rewrite & ASP.Net MVC - Url Redirect

26 Dec 2016, 11:09

Hello.

Answered to your Stackoverflow post.

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 19 guests