Friday, March 16, 2012

Omitting the .ASPX Extension

I'd like know what it takes to enable users to open a specific page by
typing the page name into the browser's address bar without having to also
include the .aspx extension.
Example: WWW.MySite.COM/Login
and NOT
WWW.MySite.com/Login.aspx
Thanks!All it would take in the example you provided just having "Login" folder and
making Login.aspx a default file.
"RC" wrote:

> I'd like know what it takes to enable users to open a specific page by
> typing the page name into the browser's address bar without having to also
> include the .aspx extension.
> Example: WWW.MySite.COM/Login
> and NOT
> WWW.MySite.com/Login.aspx
> Thanks!
>
>
I am not really sure, why you want to do that. To do for every page, its
simply not possible. Because, IIS uses the requested page extension to
figure out where to send the request. For a typical asp.net page, IIS looks
at its extension .aspx, and then forward this request to aspnet_isapi.dll,
which handles the typical asp.net requests, similarly for other kinds of
pages other isapi dll's registered in the IIS metabase.
Kumar Reddi
http://kumarreddi.blogspot.com
"RC" <a@.b.com> wrote in message news:e24wKFa1EHA.324@.TK2MSFTNGP10.phx.gbl...
> I'd like know what it takes to enable users to open a specific page by
> typing the page name into the browser's address bar without having to also
> include the .aspx extension.
> Example: WWW.MySite.COM/Login
> and NOT
> WWW.MySite.com/Login.aspx
> Thanks!
>
Well try looking at :-
HTTP Handlers and HTTP Modules in ASP.NET
http://www.microsoft.com/india/msdn/articles/57.aspx
U could have your own extensions apart from ASPX if u wish..
Enjoy.
Patrick
"RC" wrote:

> I'd like know what it takes to enable users to open a specific page by
> typing the page name into the browser's address bar without having to also
> include the .aspx extension.
> Example: WWW.MySite.COM/Login
> and NOT
> WWW.MySite.com/Login.aspx
> Thanks!
>
>
Yes what Patrick said is true, but without extensions its not possible.
That's what I was saying in my previous post
--
Kumar Reddi
http://kumarreddi.blogspot.com
"Patrick.O.Ige" <PatrickOIge@.discussions.microsoft.com> wrote in message
news:4731A862-C5D1-48E4-BF9D-136676C27ADE@.microsoft.com...
> Well try looking at :-
> HTTP Handlers and HTTP Modules in ASP.NET
> http://www.microsoft.com/india/msdn/articles/57.aspx
> U could have your own extensions apart from ASPX if u wish..
> Enjoy.
> Patrick
>
> "RC" wrote:
>
also
IIS relies on file extensions in the HTTP request to figure out which
handler should honor the request. Handlers are mapped by extension. So the
only way you can practically do this is to create a folder called "Login"
and put your code in default.aspx.
Klaus H. Probst, MVP
http://www.vbbox.com/
"RC" <a@.b.com> wrote in message news:e24wKFa1EHA.324@.TK2MSFTNGP10.phx.gbl...
> I'd like know what it takes to enable users to open a specific page by
> typing the page name into the browser's address bar without having to also
> include the .aspx extension.
> Example: WWW.MySite.COM/Login
> and NOT
> WWW.MySite.com/Login.aspx
> Thanks!
>

0 comments:

Post a Comment