Hide .aspx extension

Topics: Developer Forum, User Forum
May 14, 2008 at 5:45 PM

I would like to hide the .aspx extension.

MyPage.aspx ---> MyPage


MyPage.aspx?Param1=1&Param2=2 ---> MyPage?Param1=1&Param2=2

Any help would be appreciated.

May 30, 2008 at 11:25 PM
Have you read the doc?
Have you checked the examples shipped with the download?
Have you run the Testdriver.exe ?
May 31, 2008 at 12:08 AM
Simplest case looks like this?

RewriteRule ^/([^/\.]+)$  /$1.aspx   [L]
Jun 7, 2008 at 2:37 PM
It works perfectly! Thank you.
Jun 7, 2008 at 9:06 PM
This does not contemplate the following case though:

MyPage.aspx?Param1=1&Param2=2 ---> MyPage?Param1=1&Param2=2

Any idea on how to fix it?

Thank you.

Jun 8, 2008 at 12:36 AM
yes, check the doc,
check the tests,
and try out the testdriver.exe program!

you can play with different rules and see what works.