URL without extensions

R

Raterus

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.
 
P

Prince

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]...
 
S

Scott Allen

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,
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top