Hi Christian - the trailing underscore is still a requirement in the
way you have constructed your route. For example, your sample would
match the following:-
www.domain.com/blabla-1____
You just need to make the parameter and the underscore optional:-
routes.common.route = "([^_]*)-([^_]*_)?([^_]*_)?([^_]*_)?([^_]*)
Cheers
Hello,
I created a RegexRoute and i am trying to use it as unique route for
a website:
routes.common.type = "Zend_Controller_Router_Route_Regex"
routes.common.route = "([^_]*)-([^_]*)_([^_]*)_([^_]*)_([^_]*)"
routes.common.commons.s1 = "bla bla"
routes.common.commons.s2 = 1
routes.common.commons.s3 = en
routes.common.commons.v1 = 0
routes.common.commons.v2 = 0
routes.common.map.1 = "s1"
routes.common.map.2 = "s2"
routes.common.map.3 = "s3"
routes.common.map.4 = "v1"
routes.common.map.5 = "v2"
routes.common.reverse = "%s-%s_%s_%s_%s"
I am trapping fine all url's containing all params but i can't trap
any URL which contain less params, even if i already submitted some
default values for missing params.
Sample: i can't trap www.domain.com
Sample: i can trap www.domain.com/blabla-1_2_3_4
How i should update the Regex route to trap all cases ? (with
missing params).
Cristian
--
Simon Mundy | Director | PEPTOLAB
""" " "" """""" "" "" """"""" " "" """"" " """"" " """""" "" "
202/258 Flinders Lane | Melbourne | Victoria | Australia | 3000
Voice +61 (0) 3 9654 4324 | Mobile 0438 046 061 | Fax +61 (0) 3 9654
4124
http://www.peptolab.com