URL without extensions

  • Thread starter Thread starter Prince
  • Start date Start date
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.
 
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.
message news:[email protected]...
 
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,
 
Back
Top