Hide .aspx extension

Topics: Developer Forum, User Forum
May 14, 2008 at 4: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 10:25 PM
Have you read the doc?
Have you checked the examples shipped with the download?
Have you run the Testdriver.exe ?
May 30, 2008 at 11:08 PM
Simplest case looks like this?

RewriteRule ^/([^/\.]+)$  /$1.aspx   [L]
Jun 7, 2008 at 1:37 PM
It works perfectly! Thank you.
Jun 7, 2008 at 8: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 7, 2008 at 11:36 PM
yes, check the doc,
check the tests,
and try out the testdriver.exe program!

you can play with different rules and see what works.