Andy,
I think I know what you are getting at. I will give you an example
from a site I work with. A manager can post a new job opening and
enter a description using a super-simple CMS. It is just a database
entry. No page gets created. However, they can advertise the job as
http://www.site.com/jobs/florida-sales-position/.

The way it is set up is, for that specific jobs directory, IIS is
configured so that the missing file error handler is a ColdFusion page
that has logic to retrieve data from the database based on the URL and
display the appropriate job listing content. I didn't set this up, and
I don't necessarily recommend it, since it is a pain to maintain if
every folder has this type of custom setup.

As an alternative, I recommend setting up a site-wide 404 error
handler that does what you need to do. This does need to be set up in
the Web server, since the pages you are requesting are not cfm pages,
so the CF 404 error handler specified in CF admin is not called into
action. But it is easier to set up a single 404 error handler for the
entire site than to set up one for each directory.

You could limit the custom 404 handler to a specific directory if you
set up your site with a special base directory, such as
www.site.com/r/new-inventory, where "r" secretly means redirect and
has special code to handle all the missing files that are detected in
that directory.

At some point, you will have to configure the Web server. ColdFusion
only handles .cfm requests by default, so any missing files with no
..cfm on the end are not handled by CF unless you configure the Web
server to pass these off to CF.

I see no problem using the 404 handler to do this, as long as you code
it correctly. My 404 handlers are usually very involved and correct
for most common mistakes and misspellings.

Good luck,
Mike Chabot

On 3/16/07, Andy Matthews <[EMAIL PROTECTED]> wrote:
> Okay...
>
> @ Russ:
> I'd like to avoid any sort of rewriting because I most likely will never
> have access to the server to do this. I suppose I'm looking for a CF method
> of accomplishing this. As to the last part of your response ("point to the
> right page"), that's part of my question...how do I point to that page
> without using an extension?
>
> @Mike:
> I know how to create a default page for each folder. But that's exactly what
> I'm trying to avoid. The site I'm working on is fairly shallow...maybe 10
> total pages (not counting dynamic pages). So I really don't want to create
> loads of folders to contain multiple index pages. I'd like to have an
> "events.cfm" page, which will only ever be called using:
> http://www.somesite.com/events or /events
>
> Part of this research is because my company (Dealerskins) is looking at the
> possibility of having mapped urls for common pages in our system. Right now
> when someone wants to look at new car inventory they have to go to
> http://www.cardealership.com/pages/page.cfm?pageid=15489. Eventually we'd
> like to be able to allow links which look like this:
> http://www.cardealership.com/new-inventory/ and somehow map to the
> previously mentioned link.
>
> The main problem with IIS rewriting for Dealerskins is that we have 1500
> websites which all use the same codebase. For us to add rewrite rules for
> every page on every site is not an option.
>
> Andy Matthews
> Senior Coldfusion Developer
> Office:  877.707.5467 x747
> Direct:  615.627.9747
> Fax:  615.467.6249
> [EMAIL PROTECTED]
> www.dealerskins.com
>
> -----Original Message-----
> From: Russ [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 15, 2007 11:27 PM
> To: CF-Talk
> Subject: RE: Virtual "pages", without extensions. How to do it?
>
> The best way to accomplish it is with mod_rewrite using Apache.  The 2nd
> best way is to use some IIS rewrite filter (there was a thread on this
> today).  The 3rd best way is to set up a custom 404 handler and then parse
> the url and point to the right page.
>
> Russ
>
> > -----Original Message-----
> > From: Andy Matthews [mailto:[EMAIL PROTECTED]
> > Sent: Friday, March 16, 2007 12:04 AM
> > To: CF-Talk
> > Subject: Virtual "pages", without extensions. How to do it?
> >
> > I've been seeing a lot of URLs set up like this in the last yera or so:
> >
> > http://www.somesite.com/financing/
> > or
> > http://www.somesite.com/company-info/aboutus/
> >
> > I have a custom tag that allows me to have a URL like this:
> > http://www.somesite.com/page/aboutus
> >
> > where page is the key and aboutus is the page name. But short of
> > creating actual folders with individual index pages, I don't know how
> > people are doing this. In the first example, would I create a file
> > named "financing.cfm" and somehow map it to that URL? Is there a way
> > of accomplishing this in code?
> >
> > I've got a client I'm going to be working with soon that would like
> > nice search engine friendly pages and I'm just doing my research.
> > Anyone have ideas?
> >
> >
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion MX7 by AdobeĀ®
Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. 
Free Trial. http://www.adobe.com/products/coldfusion?sdid=RVJV

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:272892
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to