I'm trying to redirect some unfriendly URLs with more descriptive ones. These URLs end in .aspx?cid=3916
with the last digits being different for each category name page. I want it to instead redirect to Category/CategoryName/3916
. I tried this in the web.config
file:
<location path="Category.aspx?cid=3916">
<system.webServer>
<httpRedirect enabled="true" destination="http://www.example.com/Category/CategoryName/3916" httpResponseStatus="Permanent" />
</system.webServer>
</location>
but since it didn't end with just the extension, it didn't work. Is there an easy way to get this to work? I'm using IIS 7.5.