Am not sure if you're defining both these side by side. In my experience, the first route you're attempting to map would would actually be handled just fine by the second (thanks to the default value you provided for attribute ) Thus, this route: foo. Com/resources/user/:id/:attribute With this call: foo.Com/resources/user/12345 Would assume your default attribute value: foo.
Com/resources/user/12345 As the blank value may be removed by your web server (apache treats multiple slashes as a single slash), I'd recommend defaulting the attribute to something that could be called by name and it will function similar to an index. Html file in a folder: foo.Com/resources/user/12345/ foo. Com/resources/user/12345/general/ (same result) The best luck I've had troubleshooting is commenting out the route default values and requirements line-by-line in a sequence.
You end up seeing the 'edge' of the route itself (as it will fall back to the defaults as you give it less information) Also, in your example, note that you're defining your id requirements twice: routes. User_attribute.reqs. Id = "\d+" routes.
User_attribute. Reqs.Id = "reviews|lists Would be adjusted to: routes. User_attribute.reqs.
Id = "\d+" routes. User_attribute.reqs. Attribute = "reviews|lists May have an effect on your results as well.
Hope this helps.
Am not sure if you're defining both these side by side. In my experience, the first route you're attempting to map would would actually be handled just fine by the second (thanks to the default value you provided for attribute). Thus, this route: foo.Com/resources/user/:id/:attribute With this call: foo.
Com/resources/user/12345/ Would assume your default attribute value: foo. Com/resources/user/12345// As the blank value may be removed by your web server (apache treats multiple slashes as a single slash), I'd recommend defaulting the attribute to something that could be called by name and it will function similar to an index. Html file in a folder: foo.
Com/resources/user/12345/ foo. Com/resources/user/12345/general/ (same result) The best luck I've had troubleshooting is commenting out the route default values and requirements line-by-line in a sequence. You end up seeing the 'edge' of the route itself (as it will fall back to the defaults as you give it less information).
Also, in your example, note that you're defining your id requirements twice: routes. User_attribute. Reqs.Id = "\d+" routes.
User_attribute.reqs. Id = "reviews|lists" Would be adjusted to: routes. User_attribute.reqs.
Id = "\d+" routes. User_attribute.reqs. Attribute = "reviews|lists" May have an effect on your results as well.
Hope this helps.
I think you should only change the ordering of the rules ... so you first put more specific rules on the top and more general on the bottom! Routes. User_attribute.
Route = "resources/user/:id/:attribute/" routes. User_attribute.defaults" rel="nofollow">attribute.defaults. Controller = user routes.
User_attribute.defaults" rel="nofollow">attribute.defaults. Action = getAttribute routes. User_attribute.
Defaults.Id = 0 routes. User_attribute.defaults" rel="nofollow">attribute.defaults. Attribute = "" routes.
User_attribute.reqs. Id = "\d+" routes. User_attribute.
Reqs.Id = "reviews|lists" routes.user. Route = "resources/user/:id" routes.user.defaults. Controller = user routes.user.defaults.
Action = get routes.user.defaults. Id = 0 routes.user.reqs. Id = "\d+" I had a similar problem and it fixed my problem!
Actually, that doesn't work. It throws the exact same exception. Thanks for the suggestion, though.
– Peter Bailey Dec 17 '08 at 22:34 More general rules should be placed first – David Caunt Jul 12 '09 at 11:09.
So I have been doing my best trying to absorb as much as I can about the Zend Framework which is pretty new to me, i'm about two weeks in since my first attempts and being doing well so far. However I have run into a small issue I just can't figure out. So here's the deal, I have a standard Zend Framework project with a number of modules in it.
Now I have a simple test link set in the view for the WMSController wich is supposed to direct someone klicking it to the IndexController of the content module. Now as you can probably see this link is NOT going to work since it is pointing towards localhost/wms/content which would be the content action in the WMSController which doesn't exist at this moment.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.