Simple way to create SES links on legacy site?

Contributor ,
Feb 07, 2016 Feb 07, 2016

Copy link to clipboard


Hi.  I am looking for an easy way to create search engine safe/friendly (SES) URLs for my legacy site.  Right now all my content URLs are currently being rewritten in IIS 7.5 using the URL Rewrite module to make look like  We have been doing this for years and it works fine.  All our internal links are hard-coded based on this.

However, now we want to inject our page titles into the URLs so they looks like  If I handle the URL using Application.cfm or onRequestEnd.cfm I can easily match the pageID with the title in the database and append it to the end substituting spaces for hyphens and use CFLOCATION with a 301 status code to send it on its merry way but this sets up an infinite loop.  How do I get around this loop?  Is there a simpler way to do this that I'm not seeing?

We are trying to avoid manually retrofitting the thousands of existing URLs throughout our site so I need to come up with an automated way.  Once established I would place rel=canonical on all our pages to ensure link juice translates from the old pageIDs to the newer SES URLs.  The pageID is still required in the URL somewhere for our content pages to work.  If there was a way I could remove the pageID altogether so users and search engines only see that would be even better but so far I have not looking into ways of doing this.  I've been focused on the first solution to start.

I have seen others talk about using a missing template handler or other front-end controller to do this but I need advice based on my current Application.cfm setup.

Any help/ideas would be appreciated.







Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation