This project has moved and is read-only. For the latest updates, please go here.

How to remove .aspx extension for custom .ASPX page

Dec 17, 2013 at 11:25 AM
Edited Dec 17, 2013 at 12:05 PM
Hi,

Sacha

I have added an .aspx page in my DNN project.... I have added web page by right clicking on website >> Add New Item. My page name is PaymentNotify.aspx.

I want to remove .aspx extension from the PaymentNotify.aspx page. i just want to call the page by using the following URL www.domain.com/PaymentNotify instead of www.domain.com/PaymentNotify.aspx.

I am using OpenURLRewriter for url rewriting, if i create page using DNN then it works fine, but when i create custom aspx page from visual studio, the page is opened only when we include the extension in the page name.

How to remove .aspx extension form custom .ASPX page and call only by the page name using OpenURLrewriter?
Dec 17, 2013 at 2:25 PM
Edited Dec 17, 2013 at 4:02 PM
Hi,

OpenUrlRewriter works only with DNN pages.

Everything is rewritten to Default.aspx

But you can maybe handle this with rewrite rules in Host Settings (which are handled in OpenUrlRewriter)

sothing like this :
from
.[star]/PaymentNotify.aspx(.[star])

[star] = the caracter star

to
~/PaymentNotify.aspx$1

Regards,
Sacha