I was trying to make a URL rewrite rule in the web.config. The rule should be done to create a fake url of a page.
If i have this link:
wwww.mywebsite.com/en-us/mypage it should redirect to wwww.mywebsite.com/en-us/fakepage
but in certain cases it could be that the webpage is
wwww.mywebsite.com/en-us/mypage/value to wwww.mywebsite.com/en-us/fakepage/value.
O have created something similar to this but it is not working correctly.
<rewrite>
<rules>
<rule name="Rewrite rule" stopProcessing="true">
<match url="(.*)en-us/mypage" />
<action type="Rewrite" url="en-us/fakepage" appendQueryString="false" redirectType="Permanent"/>
</rule>
<rule name="Rewrite2" stopProcessing="true">
<match url="(.*)en-us/mypage$" />
<action type="Redirect" url="en-us/fakepage" appendQueryString="false" redirectType="Permanent"/>
</rule>
</rules>
</rewrite>