We have a requirement where we need to redirect the old domain to specific page in new domain.
e.g.
GIVEN I navigate to http://old.domain.com
THEN I should be redirected to http://new.domain.com/apple
GIVEN I navigate to http://veryold.domain.com
THEN I should be redirected to http://new.domain.com/apple
I had a look at link below which suggest it's not possible with DNS redirect: Using DNS to redirect to another URL with a path
I'm not really good on IIS Rewrite rules.
Can someone please help?
I've started with below which doesn't seem to be working well:
<rule name="Redirect old domain to new domain page" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{HTTP_HOST}" pattern="^old.domain.com$" />
</conditions>
<action type="Redirect" url="http://new.domain.com/apple" redirectType="Permanent" />
</rule>