Subsribe to our RSS

latest reactions

christian louboutin shoes
With that kind of traffic you want to ad …
Rahul Anand
Thanks for the nice post. It works for m …
Serkan
thx a lot! …
msb
Thanks for above solution.There is ano …
Lori S.
FYI, I was using this successfully in CF …

Use OpenDNS

mxna feeds

cfmailparam behaviour change in CF9.01ColdFusion Job Opportunity in Houston, TXFacial Recognition in 14 Lines Of ColdFusionColdFusion UPS PackageColdFusion Job Opportunity in Arlington, VAColdFusion Job Opportunity in San Diego, CASome ColdFusionBloggers.org GuidelinesColdFusion Positions In CaliforniaListChangeDelimsunix epoch with coldfusionQuery scripting bug in Coldfusion 9Scoth On The Rock 2011 Tickets on salefoursquareCFC updated to version 1.0, now includes ColdFusion return typeFramework One Birds of a Feather session at CFUnitedWhat makes you a good ColdFusion programmer?

All files are strictly confidential: all information is classified.
© Copyright 2002 - 2010 mximize.com.
All right reserved.

MXNA webfeed

Visit Carlos Gallupa

how to get search engine friendly URL's

To get search engine friendly url's you can do a couple of things but one of the most effective ways is having the title of your article / blog as the unique identifier of your message. See the url of this post.

The way you can achieve this, is by having the 404 error page in coldfusion handle the request. You can set the 404 page in the ColdFusion Administrator and also in your Apache or IIS setup. Just point to a CFM page that will handle all requests that can't be found on the server.

On this 404 request page you build logic that will take the URL parameters of the variable "CGI.query_string" and pass that to your SQL statement. An example on how I use this on mximize.com

<cfset id = lcase(listLast(cgi.query_string,"/"))>

<cfquery datasource="">
    SELECT title, description
    FROM article
    WHERE art_urlsave = '#variables.id#'
</cfquery>


To insert the title as an urlsave value you can use the following bit of code

<cfset art_urlsave = lcase(rereplace(form.art_title, "[^A-Za-z0-9]+", "-", "all"))>

<cfquery datasource="">    
    INSERT INTO article (art_title, art_urlsave, art_description)
    VALUE ('#form.art_title#', '#variables.art_urlsave#', '#form.art_description#')
</cfquery>


This way you can point your links to the root of the site with the "art_urlsave" value as your link

<a href="/#art_urlsave#">how to get search...</a>

This is the really really short version of how it is implemented, but it's the basics of getting nice search engine friendly URL's. If you have questions just ask them!!

6079 viewed | Your opinion...  | del.icio.us | Digg it | Tjarko @ 11/06/07 11:02 cet


Reactions:

Leave your comment

Your name


Your url/website/link/email....


Some room for your reaction is placed here..



The answer to the ultimate question is?? (42 ;-))




URL en mail addresses are translated for you... life sometimes is that simple!!