URL without extensions

Discussion in 'ASP .Net' started by Prince, Jun 21, 2004.

  1. Prince

    Prince Guest

    Prince, Jun 21, 2004
    #1
    1. Advertising

  2. Prince

    Raterus Guest

    Do you not want the user to see game.aspx displayed in the URL bar? Just use default documents within each folder. In your example, in IIS set the default document of that game folder to game.aspx. You'll have to move game.aspx from your root folder to this game folder to do that though.

    "Prince" <> wrote in message news:1f59201c457bd$163209b0$...
    > Given the following URL, www.xyz.com/game, can it be
    > redirected to www.xyz.com/game.aspx instead? Can it be
    > done using asp.net if so, how?
    >
    > thanks
    >
    >
    Raterus, Jun 21, 2004
    #2
    1. Advertising

  3. Prince

    Prince Guest

    When the user enters www.xyz.com/game, I want the URL to
    automatically change to www.xyz.com/game.aspx. I just
    don't want the person to have to worry about typing the
    extension.
    >-----Original Message-----
    >Do you not want the user to see game.aspx displayed in

    the URL bar? Just use default documents within each
    folder. In your example, in IIS set the default document
    of that game folder to game.aspx. You'll have to move
    game.aspx from your root folder to this game folder to do
    that though.
    >
    >"Prince" <> wrote in

    message news:1f59201c457bd$163209b0$...
    >> Given the following URL, www.xyz.com/game, can it be
    >> redirected to www.xyz.com/game.aspx instead? Can it

    be
    >> done using asp.net if so, how?
    >>
    >> thanks
    >>
    >>

    >.
    >
    Prince, Jun 23, 2004
    #3
  4. Prince

    Joerg Jooss Guest

    Prince wrote:
    > When the user enters www.xyz.com/game, I want the URL to
    > automatically change to www.xyz.com/game.aspx. I just
    > don't want the person to have to worry about typing the
    > extension.


    AFAIK IIS and its ISAPI extensions (and thus ASP.NET) only work based on
    extensions, not on paths.

    Cheers,

    --
    Joerg Jooss
    Joerg Jooss, Jun 26, 2004
    #4
  5. Prince

    Scott Allen Guest

    One more advanced way to do this is to use URL rewriting. In this
    approach you would map all incoming requests to ASP.NET, so even if
    the user enters a URL with a path that does not exist, your code gets
    to examine the path and can rewrite the internal path and point to an
    ASPX page to process the request.

    It's hard to explain how to do this in one newsgroup post, but there
    is a good article here:

    URL Rewriting in ASP.NET
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/urlrewriting.asp

    In particular you might want to look at "Creating Hackable URLs".

    HTH,

    --
    Scott
    http://www.OdeToCode.com




    On Mon, 21 Jun 2004 11:25:10 -0700, "Prince"
    <> wrote:

    >Given the following URL, www.xyz.com/game, can it be
    >redirected to www.xyz.com/game.aspx instead? Can it be
    >done using asp.net if so, how?
    >
    >thanks
    >
    Scott Allen, Jun 27, 2004
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jon paugh
    Replies:
    1
    Views:
    708
  2. Terry Hancock
    Replies:
    3
    Views:
    312
    Terry Hancock
    Jun 21, 2005
  3. Replies:
    2
    Views:
    241
  4. Just D.
    Replies:
    0
    Views:
    418
    Just D.
    Aug 11, 2004
  5. nick
    Replies:
    1
    Views:
    456
    David Mark
    Feb 13, 2011
Loading...

Share This Page