473,795 Members | 3,386 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1195
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.droopye yes.com>
wrote in message news:uu******** ********@tk2msf tngp13.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_Beg inRequest 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.droopye yes.com>
wrote in message news:uu******** ********@tk2msf tngp13.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.d ll) 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.droopye yes.com>
wrote in message news:uu******** ********@tk2msf tngp13.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
2691
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 http://mysite.com/pages/contact and that is not a valid page or directory, then the request is handed to http://mysite.com/pages/display.php or something like that. I am wondering what the best way to do this is - I know that I could use an ..htaccess...
9
3919
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 asp pages in the default directory. Thanks
3
2217
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 refers to the pageID. this works like a peach whenever the page is just HTML e.g. http://www.deathworld.net/camel2.0/default.asp?id=2
1
1509
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. Before going live with the changes, everything worked very well. After going public, IIS 6.0 continues to serve the static html pages with no problem but chokes on the ASP pages (however not timing out), even though the web traffic is not high...
5
2038
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 down to 91Kb, much more modem-friendly! After about 30 minutes of googling, I haven't yet found a way of serving this page up like this. I can't send headers as no php or .htaccess is allowed. Any ideas?
1
1905
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 browsers can not handle this mime type, a simple php include is at the very top of such pages. If the mentioned mime type support for the viewing browser is detected, everything above the head tag of the page is written in xhtml 1.1 code. If the...
0
5064
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 what is causing this. Any Help would be great!!! Event Type: Warning Event Source: W3SVC Event Category: None Event ID: 1012
2
1687
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
1361
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." In Internet Explorer of course you get total rubbish. Anything from "page cannot be loaded" to "403 no permission." The thing is, I figured the first two at least could handle it, maybe
2
1285
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 know... so anybody know? Thanks.
0
9672
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10437
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10214
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10164
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10001
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7538
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5437
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3723
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2920
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.