PHP Zend Route Config.ini - similar patterns -


I am using a configuration file to route my requests to my application. I have the following entries:

route.dial.product = "deal /: id / *"

routes. Deal.defaults.controller = "deal"

routes .deal.defaults.action = "index"

routes. Deal.reqs.id = "\ d +"

routes. Deal.route = "deal / purchase /: id / *"

routes .deal.defaults.controller = "deal"

routes .deal.defaults Deal.reqs.id = "\ d +"

The behavior here is what I see: mysite.com/deal/75 - This deal details 75 (will display with mysite equivalent) Com / deal /? Id = 75; Control = deal, action = index)

mysite.com/deal/buy/75 - deal 75 or buy (controller = deal, action = purchase) - Mysite.com/deal/buy?id=75 Equivalent to

I can only do one thing, and not the other which is specified in the config before, it will be the one who will work.

Can someone tell me what I am doing wrong here? Any help is greatly appreciated.

thanks, oz

the other way, that is:

  route Dealbuy.route = "deals / purchases: ID / *" routes Dealbuy.defaults.controller = "deals" routes. Dealbuy.defaults.action = "Buy" routes. Dealbuy.reqs.id = "\ d +"  

The routes need to have different names.


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -