[ColdBox 3.5.0]Routes not working. Why?

So I have this URL:
www.mysite.com/index.cfm/products/home/kitchen

And I want to be able to have this URL get there:
www.mysite.com/index.cfm/kitchen

In Routes.cfm I add:
addRoute(pattern="/kitchen ", handler=“products.home”, action=“kitchen”);

That’s correct right?? It isn’t working for me.

Where did you add it? Did you reinit?

signature0.jpg

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano

Yes, I’m pretty good with CB but this is my first time trying to use custom routing.
I also used addCourse() just to see if the reinit would throw an error and it did, so I know it’s getting reinited.

And I added my route right under this line: addRoute(pattern=":handler/:action?");

That’s why!

Routes fire in declaration order. So you are declaring a specific route before a generic route. Your route will never fire.

signature0.jpg

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano

DOH! Ah ha! Cool works now, thanks.

Was also having a routing problem. I did what Clint did, “put it right under” the existing line. Did you actually mean “You are declaring a GENERIC route BEFORE a specific route” below? I put my specific route for addRoute(pattern=‘events/ThankYou/:eventregistrationkey?’); ABOVE the line addRoute(pattern=":handler/:action?");

…and it worked. Just want to clarify what you said, there, Luis.

Okay, I should correct myself. The “…and it worked” was wrong. My OTHER pages work, like:
/index.cfm/main/cruiseNight
index.cfm/main/goExclusive

They get to the right main.CruiseNight handler functions and main.goExclusive. However, this pattern (first in routes file) isn’t working:
addRoute(pattern=‘events/ThankYou/:eventregistrationkey?’);

Do I have it coded wrong?