Thanks all now I found the error source.
I already have tried all the possible orders for defining the routes but as said before it was not the source of error. the problem was with the trailing slash on this rule:
Router::connect('/my-controller/', array('controller' => 'my_controller', 'action'=>'index'));
it should be
Router::connect('/my-controller', array('controller' => 'my_controller', 'action'=>'index'));
and has to be defined before other one with :action parameter and both before the default route rules.
so now I am up and running with hyphens.
regards,
MN
On Wed, Aug 29, 2012 at 6:05 PM, AD7six <andydawson76@gmail.com> wrote:
On Wednesday, 29 August 2012 17:16:58 UTC+2, Mohammad Naghavi wrote:we are all trying to contribute something back into community, so if you want to help please doI don't know your contribution - but I have and I do, https://github.com/cakephp (find me)if not don't try to change the whole world match your needs just because you don't like it.One of the types of threads I reply to, are the ones where a simple question goes on for days because the advice given is misleading, going nowhere or just plain wrong.
Routes aren't the simplest part of cakephp but I repeat: routes are not magic.The logic for routes is pretty simple:foreach routes as routedoes it match?return route}}handle unmatched routeIf the route _your_ url reverse-matches is not the url(string) you expect - it's because the route _doesn't_ match the array you're passing it or matches another route before finding the one you're expecting.I use colors to recognize my text from others as fast as possible. If you don't like it, it doesn't mean it is useless!!!!!Sure - but it does continue to dissuade me from reading beyond word 1 on the thread.AD--
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
No comments:
Post a Comment