[coldbox:15767] Routing

You want to use routes.

http://wiki.coldbox.org/wiki/URLMappings.cfm

Also, your second URL should have been
http://localhost/index.cfm/Global/about
not
http://localhost/index/Global/about

Using routes will allow you to use URLs such as
http://localhost/index.cfm/about

And if you want to get rid of the “index.cfm”, the link I provided shows you how to do that as well.

In that case, your URL could just be
http://localhost/about

Thanks!

~Brad

Hi Brad

Thank you for your answer.

Okay, I’ve read the article and found the following solution:

  • addRoute (pattern = “/ about”, handler = “General”, action = “about”);
  • addRoute (pattern = “/ tour”, handler = “General”, action = “tour”);
    and further more

How can I merge these routes? Possibly with regex?

Thanks a lot
Andy

2012/8/15 Brad Wood <brad@bradwood.com>