Zend Route Regex Backslash problem

I have a reverse issue for regex routes, my config file is below:

routes.route1.type = "Zend_Controller_Router_Route_Regex"
routes.route1.route = "([^\,]+)([^p]*)(?:\,page_[0-9]+)?\.html"
routes.route1.defaults.controller = "index"
routes.route1.defaults.action = "find"
routes.route1.map.1 = "url_path"
routes.route1.map.2 = "url"
routes.route1.map.3 = "options"
routes.route1.map.4 = "page"
routes.route1.reverse = "%s%s,page_%d.html"

      

url will be http://www.site.com/cat1/cat2/cat3/cat4/cat5/title-id1_id2,page_1.html number of categories not specified current regex works fine and immediately gets all categories, but reverse formats all slashes in the format html:% 2F does anyone know how I can keep forward slashes? I need the reverse for pagination and all the html objects just look ugly.

thanks:)

0


a source to share


1 answer


If you are using a URL helper, set the fourth parameter to false to disable encoding (which is enabled by default). So something like:



<?=$this->url(array(
   'url_path' => 'whatever',
   'url' => 'something'
   'options' => 'foo',
   'page' => 'bar'
), 'route1', false, false)?>

      

+3


a source







All Articles