Hello,

Thanks for reply.

With few corrections the rule would work perfectly - still testing now.

Anyway there is one more problem: in case i am calling www.domain.com the params won't be initialized with default values.... No idea why...

Cristian
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____ <http://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:

  1.
      routes.common.type = "Zend_Controller_Router_Route_Regex"
  2.
      routes.common.route = "([^_]*)-([^_]*)_([^_]*)_([^_]*)_([^_]*)"
  3.
4.
      routes.common.commons.s1 = "bla bla"
  5.
      routes.common.commons.s2 = 1
  6.
      routes.common.commons.s3 = en
  7.
      routes.common.commons.v1 = 0
  8.
      routes.common.commons.v2 = 0
  9.
10.
      routes.common.map.1 = "s1"
 11.
      routes.common.map.2 = "s2"
 12.
      routes.common.map.3 = "s3"
 13.
      routes.common.map.4 = "v1"
 14.
      routes.common.map.5 = "v2"
 15.
      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


Reply via email to