I don't see anything wrong with the idea. I've done similar many times.
The only question I would have is why you're using CFHTTP to grab the
file. If it's on your server, you could do a <cfinclude> and it will
drop it right in the page. I hope that helps. 


John Burns
Certified Advanced ColdFusion MX Developer
Wyle Laboratories, Inc. | Web Developer
 

-----Original Message-----
From: Matt Robertson [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 21, 2005 11:22 AM
To: CF-Talk
Subject: Whats wrong with this friendly URL idea?

I have a client with a completely dynamic site that we want to turn
static.  As in dynamic admin area publishing static content (about 20k
pages).  But before we can do that there are issues that will take
months to resolve (training users in the new admin area, just for
starters).  Runs on CF7 and a pair of MS SQL Servers.  Dual procs, 2gb,
win2k3.

So as a stopgap to get SE crawling going while we resolve these other
issues I dummied up a way that mimics what the page naming conventions
will be.  What I do is take db output and build a field name, like
this:

http://mysite.com/static/manufacturer_model_12345.cfm

which gives me make and model of the product in the url as keywords, and
the primary key of the db record.  When someone tries to visit that
page, it doesn't really exist, so a 404 is generated.  CF's 404 handler
then kicks in where I have code that recognizes this url as needing
special handling (<cfif FindNoCase("static/",cgi.path_info,"1")>,  makes
a cfhttp call to the dynamic page and displays the result using
cfhttp.filecontent.

The client tells me that SE's are crawling these pages like crazy, and
results are already showing up in Google.

Clearly the use of cfhttp is a resource-intensive way to serve up a
page, even if the call is to the same CF server.  And I'm basically
running all of this content thru a 404 handler, which is weird as well
(the 404 handler can deal with real 404's as well).  The added resource
usage appears to be well within the server's capabilities, and its not
throwing any errors.  Can anyone see other problems with this solution?
It seems to be working so well I'm tempted to skip the move to static
publishing and call this done.

--
--mattRobertson--
Janitor, MSB Web Systems
mysecretbase.com



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:227447
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to