1
votes

I'm trying to create an alias for Virtual Application in IIS 8.5 by URL Rewrite 2.1 The rule isn't working at all. I get the 404 error

Here is my rewrite section in web.config:
        <rewrite>
            <rules>
                <rule name="MBAM Helpdesk" stopProcessing="true">
                    <match url="https://my.site.com/helpdesk" />
                    <action type="Rewrite" url="https://my.site.com/Microsoft%20BitLocker%20Administration%20and%20Monitoring" />
                </rule>
            </rules>
        </rewrite>

https://my.site.com/helpdesk returns 404 error

1

1 Answers

0
votes

According to your description, firstly if you want redirect the exact url ,you should add patternSyntax="ExactMatch" in rule ,then match tag in url rewrite could only get the path of url , not the whole url. So I suggest that you could write as below:

<rule name="rule1" patternSyntax="ExactMatch">
                    <match url="helpdesk" />
                    <action type="Rewrite" url="https://my.site.com/Microsoft%20BitLocker%20Administration%20and%20Monitoring" />
                </rule>