我有这个分段路线:
'content' => array(
'type' => 'Segment',
'options' => array(
'route' => '/:title{-}-:id',
'constraints' => array(
'title' => '[a-zA-Z0-9_-]*',
'id' => '[0-9]+',
),
'defaults' => array(
'controller' => 'content',
'action' => 'index',
),
),
),
它正确识别出这样的网址,“id = 20”:
http://example.com/blood-on-ice-20
但它也使用此网址识别“id = 20”:
http://example.com/timekeeper-20th-anniversary-box-12951
我该如何避免这种情况?