jeremiahx|com J.J. Merrick on Facebook jeremiahx on Twitter

Ask a Ninja: Rewriting URLs strictly in ColdFusion

This was recently emailed into me:

Thomas <*************> wrote:
Could you help me with a SEO Url rewrite that I can plug into my
Application.cfm.. I don’t want to have to use an IISrewrite..

Does any code come to mind.. I’ve been searching and I can’t find anything
without haveing to use some sort of redirect.

Thanks for the help

As a matter of fact you can do something close to this using a method that Adam Tuttle created over at his blog. Instead of rehashing it here I will refer you over to his entry!

http://tuttletree.com/nerdblog/?p=59

update: Yet another method…

http://www.garyrgilbert.com/blog/index.cfm/2008/1/2/Coldfusion-Mod-Rewrite

Enjoy!

6 Comments

Adam Tuttle  on January 2nd, 2008

Thanks for the link!

I’ve since come up with a way to accomplish the same results without the error-prone method that’s vulnerable to trailing slashes and an odd number of tokens. I guess I should update the post to include that new code.

J.J. Merrick  on January 2nd, 2008

ah, well you better get on that! :-)

NerdFusion » cf_rewrite  on January 2nd, 2008

[...] I fixed that. Of course, I was lazy and didn’t update this post to reflect that, but now that it’s been linked by J.J. Merrick, I suppose it would be [...]

Adam Tuttle  on January 2nd, 2008

Done and done. ;o)

NerdFusion » Update to my cf_rewrite code  on January 2nd, 2008

[...] J.J. Merrick linked to my cf_rewrite post, which reminded me that I had improved the code but never posted it. I’ve [...]

Cutter  on January 2nd, 2008

Don’t forget this little nugget either:

http://www.coldfusionjedi.com/index.cfm/2005/8/2/Ask-a-Jedi-Working-with-SES-URLs-and-ColdFusion

(not that Ray needs more site traffic or anything;)

Leave a Comment