Saturday, June 16, 2007

SES (Search Engine Safe) URLs w/ Coldfusion

Another one of my ventures today was finally learning how to implement search engine safe URLs.  If you are a Coldfusion Developer like me, I am glad to let you know that this is an easy task to overcome. While taking some time to read Raymond Camden's BlogCFC documentation, since I saw it was using SES URLs, I took notice of the following Adobe Tech Note : "http://www.adobe.com/go/2addd247". It basically tells you how to make changes to your web.xml file to allow this. He makes note of this in case your server had problems with the BlogCFC SES URLs and needed to do the change as noted by Adobe. When I inspected my web.xml file, the required change was already done.

Now that I knew how to enable it, I needed to know how to do it. One way is to inspect Ray's work inside his parseses.cfm file or another great blog entry I found was Clint's Blog : Coldfusion SES URL. This entry pretty much sums it all up and allows you to begin your way to developing with SES URLs.

There are other ways to do this with the webserver itself. Apache has mod_rewrite, but alas I use IIS6. For IIS 3rd party ISAPI filters are available and you can find out more by clicking here (Some IIS URL Rewriting Links).  For me, I think the built in solution with CF is sufficient. I love Coldfusion!!!!

Until the next time ....

3 comments:

  1. A strange issue has been happening for me. You can see the issue if you go to http://www.jasonpresley.net/demo/index2.cfm. That page loads just fine. However, if you go to http://www.jasonpresley.net/demo/index2.cfm/about-our-company then none of the css on the page loads. I am using mangoblog on my site and it uses SE friendly urls so I know it can be done on my server but I can get it to work for my own code. If anyone knows what is going on PLEASE let me know!!!

    ReplyDelete
  2. A strange issue has been happening for me. You can see the issue if you go to http://www.jasonpresley.net/demo/index2.cfm. That page loads just fine. However, if you go to http://www.jasonpresley.net/demo/index2.cfm/about-our-company then none of the css on the page loads. I am using mangoblog on my site and it uses SE friendly urls so I know it can be done on my server but I can get it to work for my own code. If anyone knows what is going on PLEASE let me know!!!

    ReplyDelete
  3. Hello Jason,

    It appears what doesn't load is the images from their src attribute and td backgrounds from their background attribute. If you use a relative path from your root you will see it work with no problem.

    ie.
    <img width="760" height="100" alt="" src="/demo/sitefiles/images/logo.jpg"/>

    This appears to be an issue of the browser loading the images from the current path you are in forward.

    ReplyDelete