How do I get started on URL Rewrite? match abc.aspx then rewrite to xyz.aspx

Good day,

I am using IIS 10.0 and Microsoft Visual Studio 2010, ASP.Net

apparently this doesn't do as I expected it to do. I tried redirect but it gives me an HTTP 404 error, because there is a none existing xyz.aspx on the iis server or resource.

But I just really want to rewrite the abc.aspx to xyz.aspx without really redirecting, is this possible? I tried running this and it just stays still on abc.aspx, please help, thank you.

<system.webServer>
<rewrite>
<rules>
<rule name="abcRewrite" stopProcessing="true">
<match url="abc.aspx" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" />
</conditions>
<action type="Rewrite" url="xyz.aspx" />
</rule>
</rules>
</rewrite>
</system.webServer>
Raniel Christian QuiranteSoftware EngineerAsked:
Who is Participating?
 
MrunalCommented:
Above approach is mainly used for executing different extensions of file or pages.

Please refer to below url:

https://www.simplethread.com/exploring-systemwebrouting/

This is better approach.
2
 
MishaProgrammerCommented:
Do you read this article about Rewrite in asp net?
https://msdn.microsoft.com/en-us/library/ms972974.aspx
1
 
MishaProgrammerCommented:
There is no activity from author.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.