ZF-9879: Zend Controller Router Route's assemble method incorectly encodes slashes for use with url rewriting.

Issue Type: Bug Created: 2010-05-23T04:35:24.000+0000 Last Updated: 2011-09-20T10:42:17.000+0000 Status: Open Fix version(s): Reporter: Sylvain DIDELOT (neck) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_Controller

Related issues: Attachments:


Calling Zend_Controller_Router_Route::assemble with $encode set to true and url rewriting enabled, if a parameter contains a slash, will return something like:


The resulting URL being invalid, it is rejected by Apache (and possibly other servers) before any rewriting attempt is even made. The supposed correct syntax is:


However this leads to q's value being "%2Fquery", and therefore would also need extra processing when reading parameters from URL.

See also: RFC2396


Posted by Sergio Vaccaro (hujuice) on 2010-08-14T04:47:30.000+0000

It is because an (odd?) Apache (2.x?) behavior. Here is the reason and the solution:…

Setting ``` in the Apache configuration is a solution. Be careful because this directive must be given in server config or virtual host context.

If this is considered a good solution, this bug could be a documentation lack.

See also this post:…

Posted by Maxim Postoronca (max4ever) on 2011-09-20T10:42:17.000+0000

if i use

<pre class="highlight"> 
 it doesn't work

if i use 

it works, but i have then to ``` the 'url' parameter

Have you found an issue?

See the Overview section for more details.


© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.