Preventing normal request to .ASPX pages when using URL routing

I am using URL routing in my .Net application. I would like to prevent users from accessing the .aspx page.

Example:

Actual URL - http://www.mysite.com/Testimonials.aspx

Routed URL - http://www.mysite.com/Testimonials

I want users to be able to access the page only by going to /Testimonials, but I would like to configure /Testimonials.aspxto redirect to my route to /Testimonials.

Is there an easy way to do this for routed pages throughout the application?

+5
source share

All Articles