473,326 Members | 2,127 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Serving pages which do not exist

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
5 1170
By the way, this also needs to be done in code, not statically in a config
file or something.
Nov 19 '05 #2
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
by: Joshua Beall | last post by:
Hi All, I would like to setup my site so that when a page is request that does not exist, transfer is instead passed to a certain page that I specify. For instance, if the user requests...
9
by: jeanfor | last post by:
I get a http 500 error on all asp pages. When turning off the friendly message box, the message is "Class does not exist". What is the fix for that? This affect all asp pages incling the default...
3
by: -[ CaMeL ]- a55m0nk | last post by:
Hi there i am creating a clan website in ASP and am making a page serving script a link sends a query to the default page and then serves the page by grabbing the HTML from a database that...
1
by: Geoff Winsor | last post by:
Hi, I just finished migrating our web site to Windows server 2003 from Windows 2000. It consists of a mix of static html and .asp pages that mostly connect to MS access databases on the back end....
5
by: Alan | last post by:
I have a website with no ssi, php, cgi...nothing. Plain old flat pages are all it serves. I need to upload a list to it - a big, plain text list in html. A 2Mb list! With gzip compress, it comes...
1
by: cwdjrxyz | last post by:
I am now writing many new pages in xhtml 1.1. They are served as true xhtml by setting the mime type of the server to application/xhtml+xml for the .xhtml extension. Since IE6 and some earlier...
0
by: jack | last post by:
I am getting this error on my web server runnint ASP.NET on Windows 2003, it kills the serving web pages. The only way to get the web pages to start serving is to restart the server. I can't find...
2
by: Jim Stools | last post by:
Server 2000 IIS 5 The server stopped serving pages on all the web sites: The Following error message: The page cannot be found HTTP 404 - File not found Internet Information Services
9
by: -Lost | last post by:
In Firefox and Safari for example, if I serve my XHTML documents as application/xml or xhtml+xml they only display the top inch or so of the document. In Opera it says "object has been blocked."...
2
by: plenty900 | last post by:
Hi folks, If 2 copies of Apache are serving the same pages and running the same PHP, what if anything could get messed up? I am specifically thinking session variables might, but I know I don't...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.