1

I would like to be able to match a URL like this

www.site.com/cc/[action-name-first-part].12345.[action-name-second-part]

Basically the resulting action would be a concatenation of the 2 action name.

My current route looks like this

$ccRoute = new Zend_Controller_Router_Route_Regex(
'cc/([^.]).([^.]).([^.]*)',
array('controller' => 'cc'),
array('action-first-part' => 1, 'arbitrary-number' => 2, 'action-second-part' => 3)
);

this partner matches fine. but with the third argument (mapping argument), how can I concat the 1 and 3 index and just pass the correct action to the controller.

Thanks.

1 Answer 1

0

As far as I remember, you cannot do this with the regex routes. However, it's quite trivial to make a new route class that can do this.

Here is a quick answer on how to make your own route class.

how to get dynamic URL like mydomain.com/username using zend framework

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.