sanjshah12
asked on
Rewrite URL
Hi,
I am trying to add a few URL rewrites, as an example, I have the following in my webconfig:
I am running through VS for testing but just get a page not found (HTTP Error 404.0 - Not Found) when I navigate to http://localhost:56192/Users/Apples
Any help is appreciated.
Regards,
I am trying to add a few URL rewrites, as an example, I have the following in my webconfig:
<rewrite>
<rules>
<rule name="SpecificRewrite" stopProcessing="true">
<match url="~/Users/Apples" />
<action type="Redirect" url="~/Users/Products.aspx?category=apples" redirectType="Permanent" />
</rule>
</rules>
</rewrite>
I am running through VS for testing but just get a page not found (HTTP Error 404.0 - Not Found) when I navigate to http://localhost:56192/Users/Apples
Any help is appreciated.
Regards,
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Those two rules have the same name "SpecificRewrite". May be that caused the error?
ASKER
Apologies, I forgot to change the name!
ASKER
Many thanks zc2
You're welcome
ASKER
How am I able to add multiple rules? I tried duplicating but get an error
Open in new window