Joshua
Joshua

Reputation: 2295

asp.net url rewrite

<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.

Upvotes: 1

Views: 506

Answers (1)

Ebad Masood
Ebad Masood

Reputation: 2379

Try this:

<match url="^/Test1\.aspx$" />

Upvotes: 2

Related Questions