Im trying to handle IIS Rewrite for Specific website and port.
This is my Setting in web.config (Im Using Asp.net MVC)
<rewrite>
<rules>
<rule name="test" stopProcessing="true">
<match url="^(https?:\/\/)?127\.0\.0\.1:80\/?$" />
<conditions>
</conditions>
<action type="Redirect" url="http://google.com" />
</rule>
</rules>
</rewrite>
and when i call address http://127.0.0.1 it should redicret me to google but it wont.
if i change it like this it works :
<rewrite>
<rules>
<rule name="test" stopProcessing="true">
<match url=(.*) />
<conditions>
</conditions>
<action type="Redirect" url="http://google.com" />
</rule>
</rules>
</rewrite>
the pattren works perfectly on my inbound rule :
adding condition also didnt help :
<rewrite>
<rules>
<rule name="test" stopProcessing="true">
<match url="^(https?:\/\/)?127\.0\.0\.1:80\/?$" />
<conditions>
<add input="{HTTP_HOST}" pattern="^(https?:\/\/)?127\.0\.0\.1:80\/?$" />
</conditions>
<action type="Redirect" url="http://google.com" />
</rule>
</rules>
</rewrite>
ive enabled the FRT to check log and it shows this :
<failedRequest url="http://127.0.0.1:80/" siteId="1" appPoolId="DefaultAppPool"
processId="8432" verb="GET" remoteUserName="" userName="" tokenUserName="NT AUTHORITY\IUSR"
authenticationType="anonymous" activityId="{800008BA-0001-E700-B63F-84710C7967BB}"
failureReason="STATUS_CODE" statusCode="302" triggerStatusCode="302" timeTaken="0"
xmlns:freb="http://schemas.microsoft.com/win/2006/06/iis/freb"
