Also, if you're concerned about the 404 thing, you could use a rewrite
command to do it at the webserver level. Using regular expressions you
can have the webserver return the correct content based on the url. If
you're using apache, this is built in already. If you're using IIS,
there are ISAPI plugins to do this. It's actually really slick and gives
you a lot of flexibility on how to have your urls and pages. 


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



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:227448
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