Skip to main content
Known Participant
September 8, 2010
Question

Friendly Short URL's

  • September 8, 2010
  • 2 replies
  • 1050 views

Hi,

How can I get friendly urls to pages, e.g. www.abc.com/article-title or www.abc.com/health/article-title or www.abc.com/health/workouts/article-title

This is because right now my urls are www.abc.com/xyz.cfm?id=article-id

This is how my url's get generated <a href="xyzcfm?id=#id#">link</a>

I know that MVC frameworks can do it, but my apps are purely CF, and I do not want to use the frameworks.

Any help will be greatly appreciated.

On CF8, with using the built in server, apps to be hosted in a windows enviroment.

    This topic has been closed for replies.

    2 replies

    Legend
    September 8, 2010

    For Fusebox, look up SES or Search Engine Safe URLs. I have to imagine most MVC frameworks support something similar. You can also combine this with a sitewide 404 page and do your own redirect for specific pages.

    Inspiring
    September 8, 2010

    You could use a URL rewriting component for your web server.

    For IIS 7:

    http://www.iis.net/download/URLRewrite

    For Apache:

    http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html

    September 9, 2010

    Hey sorry to jump in on this, but you mentioned the Re=Write module for IIS. I was a little confused. Do you download this extension to you local desktop? or to your remote hosting server?. I have IIS on my machine, but at the moment have it disabled due to running WAMP as well. I know how to configure WAMP to run on a different port, but if this extension goes on my remote server, I wouldnt have to do that. Thanks for any advice!

    Inspiring
    September 9, 2010

    If you're using IIS then you can deploy rewrite on both development and production machines. If you're using Apache then you would use mod rewrite or another Apache specific rewriting module. I would recommend developing and deploying on the same platform (Apache/IIS) if possible.

    You should consider directing questions about IIS or Apache to forums specific to those products.