By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,952 Members | 1,686 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,952 IT Pros & Developers. It's quick & easy.

Serving pages which do not exist

P: n/a
Hi all

Instead of a url like so

http://www.howtodothings.com/viewarticle.aspx?id=1

I'd like to do this

http://www.howtodothings.com/article...otnet/001.html
I don't want to have to create all of the subfolders + html files etc. I
vaguely remember reading somewhere that it is possible to do this. Where
IIS receives a request for a specific page, but the request is actually
internally mapped to something else (the first url I showed).

Could someone tell me how this is done please, or maybe let me have a URL
explaining it?

Thanks
--
Pete
====
ECO Modeler, Audio compression components, DIB graphics controls,
FastStrings
http://www.droopyeyes.com

Read or write articles on just about anything
http://www.HowToDoThings.com

My blog
http://blogs.slcdug.org/petermorris/
Nov 19 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
By the way, this also needs to be done in code, not statically in a config
file or something.
Nov 19 '05 #2

P: n/a
The concept is called URL Rewriting. Theres lots of good examples about to
learn from and give you a starting point to make something fit for your
exact requirement.

http://www.google.co.uk/search?hl=en...e+Search&meta=

--
Regards

John Timney
ASP.NET MVP
Microsoft Regional Director

"Peter Morris [Droopy eyes software]" <pe**@not.this.or.this.droopyeyes.com>
wrote in message news:uu****************@tk2msftngp13.phx.gbl...
Hi all

Instead of a url like so

http://www.howtodothings.com/viewarticle.aspx?id=1

I'd like to do this

http://www.howtodothings.com/article...otnet/001.html
I don't want to have to create all of the subfolders + html files etc. I
vaguely remember reading somewhere that it is possible to do this. Where
IIS receives a request for a specific page, but the request is actually
internally mapped to something else (the first url I showed).

Could someone tell me how this is done please, or maybe let me have a URL
explaining it?

Thanks
--
Pete
====
ECO Modeler, Audio compression components, DIB graphics controls,
FastStrings
http://www.droopyeyes.com

Read or write articles on just about anything
http://www.HowToDoThings.com

My blog
http://blogs.slcdug.org/petermorris/

Nov 19 '05 #3

P: n/a
The February 2005 issue of MSDN Magazine has an article that touches on
this. An older issue covers the same subject as well.

In the Feb 2005 issue, they use an HttpModule but this can also be
implemented just as easily in the Application_BeginRequest event in
global.asax which is what i typically use. [Figure 3 includes a code
listing for rewriting a URL]

http://msdn.microsoft.com/msdnmag/is...N/default.aspx

--
Dave Fancher
http://davefancher.blogspot.com
"Peter Morris [Droopy eyes software]" <pe**@not.this.or.this.droopyeyes.com>
wrote in message news:uu****************@tk2msftngp13.phx.gbl...
Hi all

Instead of a url like so

http://www.howtodothings.com/viewarticle.aspx?id=1

I'd like to do this

http://www.howtodothings.com/article...otnet/001.html
I don't want to have to create all of the subfolders + html files etc. I
vaguely remember reading somewhere that it is possible to do this. Where
IIS receives a request for a specific page, but the request is actually
internally mapped to something else (the first url I showed).

Could someone tell me how this is done please, or maybe let me have a URL
explaining it?

Thanks
--
Pete
====
ECO Modeler, Audio compression components, DIB graphics controls,
FastStrings
http://www.droopyeyes.com

Read or write articles on just about anything
http://www.HowToDoThings.com

My blog
http://blogs.slcdug.org/petermorris/

Nov 19 '05 #4

P: n/a
Thanks for the information. I find it hard to search for information on
something when you don't know what it is called :-)
--
Pete
====
ECO Modeler, Audio compression components, DIB graphics controls,
FastStrings
http://www.droopyeyes.com

Read or write articles on just about anything
http://www.HowToDoThings.com

My blog
http://blogs.slcdug.org/petermorris/
Nov 19 '05 #5

P: n/a
Hello,

map *.* extensions to ASP.NET (aspnet_isapi.dll) so that all requests not
mapped to elsewhere are processed by it (note that this can cause
performance burden on the server), and then at ASP.NET side you can map a
HTTP handler to this * extension whichs again solves what action should be
done based on query string.

Note that you can also do some tricks onfiguring IIS such that when ever a
page requested is not found it redirects to a custom page (your page) with
certain parameters and you can again in your logic decide what to do based
on the parameters.
--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
"Peter Morris [Droopy eyes software]" <pe**@not.this.or.this.droopyeyes.com>
wrote in message news:uu****************@tk2msftngp13.phx.gbl...
Hi all

Instead of a url like so

http://www.howtodothings.com/viewarticle.aspx?id=1

I'd like to do this

http://www.howtodothings.com/article...otnet/001.html
I don't want to have to create all of the subfolders + html files etc. I
vaguely remember reading somewhere that it is possible to do this. Where
IIS receives a request for a specific page, but the request is actually
internally mapped to something else (the first url I showed).

Could someone tell me how this is done please, or maybe let me have a URL
explaining it?

Thanks
--
Pete
====
ECO Modeler, Audio compression components, DIB graphics controls,
FastStrings
http://www.droopyeyes.com

Read or write articles on just about anything
http://www.HowToDoThings.com

My blog
http://blogs.slcdug.org/petermorris/

Nov 19 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.