Skip to main content
Inspiring
January 9, 2009
Question

Web friendly URLs

  • January 9, 2009
  • 3 replies
  • 609 views
Could anyone advise on the best way to do this?

I'd like my URL's to make more sense then they do at present. Currently I structure my sites to pull in cfinclude using a variable for each area, index.cfm?area=foo.

It works fine but I'd like to browse to a folder instead, something like, www.mysite.com/foo/

Is it best practice to sturcture it like this? ie better for google etc.

Any advise much appreciated, thanks in advance.


    This topic has been closed for replies.

    3 replies

    Inspiring
    January 14, 2009
    Here's a blog post I did on "Search Engine Friendly" links. Although this is
    always a matter of debate, the vast amount of evidence on the web points to
    the fact that your time is probably spent better elsewhere than on trying to
    create SEO Links.

    http://blog.cartweaver.com/index.cfm?newsid=6

    Hope this is helpful.

    --
    Lawrence *Adobe Community Expert*
    Cartweaver.com

    Complete Shopping Cart Application for
    Dreamweaver, available in ASP, PHP and CF




    "matthisco" <webforumsuser@macromedia.com> wrote in message
    news:gk72o0$amv$1@forums.macromedia.com...
    > Could anyone advise on the best way to do this?
    >
    > I'd like my URL's to make more sense then they do at present. Currently I
    > structure my sites to pull in cfinclude using a variable for each area,
    > index.cfm?area=foo.
    >
    > It works fine but I'd like to browse to a folder instead, something like,
    > www.mysite.com/foo/
    >
    > Is it best practice to sturcture it like this? ie better for google etc.
    >
    > Any advise much appreciated, thanks in advance.
    >
    >
    >
    >

    January 10, 2009
    If you want a CF only version of a SES URL then you can use this:

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

    However, you can't get rid of the file name in this version. Thus, you can only have something clean as:

    http://www.hello.com/index.cfm/my/var

    For a full stripped down URL, the best option is on the web server-side.
    Inspiring
    January 9, 2009
    matthisco,

    I am not sure if this can be achieved using coldfusion alone.

    If you are using Linux you can use regex one of the .conf files or if using windows you can install third party ISAPIRewrite.

    Just make sure the url variable is unique and use a regex similar to but if you can make sure that each url variable is unique, then you can use something along the lines of:

    RewriteRule /([\w\-]+)\.html /\?area=$1

    This should work for the SEO Friendly URLS using ISAPIRewrite option