Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Serving pages which do not exist

Reply
Thread Tools

Serving pages which do not exist

 
 
Peter Morris [Droopy eyes software]
Guest
Posts: n/a
 
      01-15-2005
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/


 
Reply With Quote
 
 
 
 
Peter Morris [Droopy eyes software]
Guest
Posts: n/a
 
      01-15-2005
By the way, this also needs to be done in code, not statically in a config
file or something.


 
Reply With Quote
 
 
 
 
John Timney \(ASP.NET MVP\)
Guest
Posts: n/a
 
      01-15-2005
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]" <(E-Mail Removed)>
wrote in message news:uuO1TIv%(E-Mail Removed)...
> 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/
>
>



 
Reply With Quote
 
Dave Fancher
Guest
Posts: n/a
 
      01-15-2005
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]" <(E-Mail Removed)>
wrote in message news:uuO1TIv%(E-Mail Removed)...
> 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/
>



 
Reply With Quote
 
Peter Morris [Droopy eyes software]
Guest
Posts: n/a
 
      01-16-2005
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/


 
Reply With Quote
 
Teemu Keiski
Guest
Posts: n/a
 
      01-23-2005
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]" <(E-Mail Removed)>
wrote in message news:uuO1TIv%(E-Mail Removed)...
> 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/
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem - Serving web pages on the desktop (SimpleHTTPServer) test@test.test Python 0 05-09-2006 05:48 AM
Problem - Serving web pages on the desktop (SimpleHTTPServer) test@test.test Python 0 05-09-2006 05:41 AM
New Web Sites - Not Serving Up ASPX Pages (but .htm is okay) Frankie ASP .Net 3 07-15-2005 09:39 PM
Image file handles left open by aspnet_wp when serving up pages Mike Kiefer ASP .Net 1 09-21-2004 08:30 PM
Serving ASP .NET pages from a Linux Server Pradeep Kumar ASP .Net 2 11-10-2003 04:08 PM



Advertisments