Because it would look ugly, not to mention detract from the user's ability to
refer to the URL as a navigational aid. Long story short the parameter in
question represents the user's current location within a directory-based
project. 

I could modify the path's URL representation to look like this-is-my-path,
but slashes would be a more realistic representation of one's position
within a file directory.

j


ryan.horn wrote:
> 
> Any reason you cannot just urlencode the parameter name to avoid the
> complexity?
> 
> 
> wjzfw wrote:
>> 
>> Hi,
>> 
>> I'm working on an application which would needs to process a route which
>> consists of a parameter containing an unknown number of slashes. For
>> instance, consider the following URL:
>> 
>> http://www.example.com/controller/action/this/is/my/parameter
>> 
>> In this example, "controller" is the controller, "action" is the action,
>> and "this/is/my/parameter" is the parameter. I'm quite familiar with
>> custom routes, however all attempts to process such a route have failed.
>> For instance I've tried this:
>> 
>> $route = new Zend_Controller_Router_Route(
>>              '/process/path/:%s',
>>                array(
>>                  'controller' => 'process',
>>                    'action' => 'path'
>>                ),
>>                array (
>>                  1 => 'path'
>>                )
>>              );
>> $router->addRoute('process', $route);
>> 
>> Apparently %s doesn't work if slashes are included in the parameter. Can
>> somebody shed some light on this problem?
>> 
>> Thanks!
>> j
>> 
> 
> 

-- 
View this message in context: 
http://n4.nabble.com/Custom-routes-regular-expressions-and-slashes-tp990107p990123.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to