1
<rule name="test" stopProcessing="true">
                    <match url="\Test1.aspx$" />
                    <conditions logicalGrouping="MatchAll">
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                    </conditions>
                    <action type="Rewrite" url="Test1" appendQueryString="true" />
                </rule>

I am using the above url rewrite configuration to rewrite one of the pages. I am getting the following error in the browser. Can anyone tell me what I am doing wrong?

The expression "\Test1.aspx$" contains an escape sequence that is not valid.

1 Answer 1

2

Try this:

<match url="^/Test1\.aspx$" />
Sign up to request clarification or add additional context in comments.

1 Comment

should it not be <match url="^/Test1\.aspx$" /> as a . is a special character in regex?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.