Need help with exception pattern RRS feed

  • Question

  • User-1430697987 posted

    I currently have a rule which rewrites the index.php in my application. The rule is below

    <?xml version="1.0" encoding="UTF-8"?>
                    <rewriteMap name="/index.php" />
                 <rule name="Clean URL" stopProcessing="true">
                    <match url="^(.*)$" />
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                    <action type="Rewrite" url="index.php/{R:1}" appendQueryString="true" />

    This works fine. What I have now is an application which would fall under the root default web site in which I don't want the rule to apply. The uri would look like this


    When the rule is in place it gets changed to this


    This has to do with arcgis so I think there is some sort of mod-rewrite going on within the app, but there is no way to access it. So basically I want to keep the rule in place for everything except for these rest requests. I am not very good with regex and still a beginner when it comes to the web.config

    Thanks in advance


    Thursday, September 21, 2017 1:26 PM

All replies

  • User-460007017 posted

    Hi craygo,

    Do you want to add the exception for https://web01.mydomain.com/arcserver/rest/services/*. You could use this  condition pattern for:

                            <add input="{URL}" pattern="^/arcserver/rest/services/(.*)$" negate="true" />

    Best Regards,

    Yuk Ding

    Friday, September 22, 2017 3:13 AM