The area name and short title are only available through the database, so I intend to setup an apache rewrite rule to forward all OLD URLs to a 'redirect.cfm'The redirect.cfm will build the new URL and perform a 301 redirect to it.

Apache rewrite will pick up the new URL and this time send it to 'content.cfm' to display the content.

Hitting the database every time a URL is requested seems excessive, and it has been suggested when I build the new URL I also add a new line in the htaccess file, a 301 redirect, so next time database access is not required.

I predict at least 50,000 redirects being created, after some Google searching I am unsure on whether this is an efficient solution. I saw another post in this forum which said

If you're on a dedicated server, at least put everything in your virtual host config as that's loaded in RAM when Apache starts up. .htaccess is a poor man's solution to Apache configuration. It should only be used when you have no other choice.

I do not know what virtual host config is, or whether I can append it via ColdFusion. Can anyone help me out with a viable solution?

wwb_99
—
2012-10-11T20:09:18Z —
#2

Have you profiled the performance here? It really should not kill you if you have your indexes setup correctly and you aren't talking OMG WEBSCALE traffic. If you are talking that kind of traffic then you probably have the hardware to handle it.

I would also look at ColdFusion's caching, this is a perfect candidate for that sort of thing.

dancook
—
2012-10-12T08:16:45Z —
#3

wwb_99 said:

Have you profiled the performance here? It really should not kill you if you have your indexes setup correctly and you aren't talking OMG WEBSCALE traffic. If you are talking that kind of traffic then you probably have the hardware to handle it.

I would also look at ColdFusion's caching, this is a perfect candidate for that sort of thing.

I guess it's not 'OMG WEBSCALE traffic'

August 2012Visits: 57,977Unique Visitors: 48,979Pageviews: 163,488

The hardware does need an upgrade and that's in the works.

Otherwise no, I haven't test the performance - I'm still putting this together as a proposal. I understand your point though, we should probably at least test it.

wwb_99
—
2012-10-12T12:25:39Z —
#4

Yeah, I'd just run with dynamic lookups, 1st fallback to CFM caching, 2nd fallback to generating a static file from the database. No need to build more infrastructure than you need, and depending on traffic patterns the redirects will fall off pretty quickly -- a good 301 strategy is really about getting google to update their links, no?