Questions tagged [zend-route]

Routing in Zend Framework's MVC implementation. Zend Framework is an open source, object-oriented web application framework implemented in PHP 5 and licensed under the New BSD License.

zend-route is a tag suitable for any questions regarding routing in Zend Framework's MVC implementation, url handling, or any other matter affecting or affected by routing in Zend Framework.

319 questions
0
votes
1 answer

Zend, URL routing, 404 urls with unidentified or unknown parameters

I a large number of routes in zend with various parameters. I need to throw a 404 if the url has 1. invalid params 2. unknown params for instance, I have the following url http://www.example.com/something/1 with route 'client' => array( …
ptheofan
  • 2,150
  • 3
  • 23
  • 36
0
votes
1 answer

Route_Regex in zend framework

My aim was to create common route for that cases: http://test.com/pages/cat_name/about http://test.com/pages/?????/about http://test.com/pages/about .... I've wrote in bootstrap: $router->addRoute("pages",new Zend_Controller_Router_Route_Regex( …
ovnia
  • 2,412
  • 4
  • 33
  • 54
0
votes
1 answer

custom routing for content pages in zf2

Hello to all zend coders. I am newbie to zend, doing code for manage pages through DB. I want to use URL for these pages like this: www.domainname.com/about-us www.domainname.com/contact-us ... Table name is 'cms_page' & attributes are: `id` int(11)…
Lalit Kaushik
  • 1,062
  • 2
  • 12
  • 30
0
votes
1 answer

Zend routing (default controller to handle all url)

At first sorry for my poor English. I want to handle all requests which do not match with my routes to CustomPageController. I am trying to configure my module.config.php like this: 'defaults' => array( 'type' =>…
Nikoole
  • 4,553
  • 4
  • 18
  • 23
0
votes
1 answer

Describing every ZF2 route - is it really required?

I'm trying to switch to ZF2 from ZF1. From what I've read about the new Zend\MVC\Router and the way it is configured, it looks like every single location should be described in ['router']['routes'] config key. Is that really so? In ZF1 you could…
temuri
  • 2,767
  • 5
  • 41
  • 63
0
votes
0 answers

Populate router without dispatch

How can i populate the router with all the available routes (controller/action) in my application without dispatching the request to the front controller? My entry script is like: $application = new Zend_Application( APPLICATION_ENV, …
AlexL
  • 1,699
  • 12
  • 20
0
votes
1 answer

Zend Route Regex - Can't use the plus symbol in the URL

I have one question about regexp in zend_route. I use this XML code to create route in ZendFramework: Zend_Controller_Router_Route_Regex c-([a-zA-Z0-9\-\_\+]+)
0
votes
2 answers

Zend route with dynamic composite action?

Is there any way to write a Zend route with dynamic composite action, meaning an action that combines more than one matched pattern or a combination of a matched pattern with a static text? Example: uri -> desired…
i--
  • 4,349
  • 2
  • 27
  • 35
0
votes
1 answer

Zend 2 Framework Routing

I'm struggling with this problem and can't get over it. What I want to achieve is a route like this: /rolepermission[/:roleid]/permissions[/:permissionid][/action/:action] Currently I came up with something like this: 'rolepermission' =>…
kinkee
  • 368
  • 2
  • 12
0
votes
1 answer

Zend routes two routes need same count of params

I don´t know what I do wrong. I got two named Zend route: $route = new Zend_Controller_Router_Route( 'catalog/:categoryIdent/:productIdent/', array( 'action' => 'viewproduct', …
DoZzOR
  • 3
  • 3
0
votes
1 answer

How can i write Routes dynamically to routes.ini file?

I need to Add Routes to my routes.ini file dynamically.Below is my code. $appConfigPath = APPLICATION_PATH . '/configs/routes.ini'; $appConfig = new Zend_Config_Ini($appConfigPath, null, array('skipExtends' => true,'allowModifications' =>…
Fawad Ghafoor
  • 6,039
  • 7
  • 41
  • 53
0
votes
1 answer

BjyAuthorize denies access when application runs from a subdirectory

I have a problem with BjyAuthorize. I can access to the routes defined in guards parameter without problem when the application is in the root folder of my virtualhost, but I get an access denied (Error 403) from BjyAuthorize when the application…
Dayron Gallardo
  • 1,502
  • 2
  • 21
  • 37
0
votes
1 answer

Why Zend_View_Helper_Url returns relative path when using the default route and absolute path when using a custom route?

I have an application running on Zend Framework 1.12 and I am using the URL view helper. I also have a few custom routes which I use with the URL helper to clean the code. When I use a format such as this: $this->url(array('module' => 'myapp',…
iMoses
  • 4,338
  • 1
  • 24
  • 39
0
votes
2 answers

ZF2 Route with Colon Separator

I am working with ZF2 and trying to setup Route configuration that uses a colon separator. For example, the web address could be www.example.com/namespace:subject and I want to send it to a specific controller, action with the two variables. I am…
vberkel
  • 76
  • 6
0
votes
1 answer

How to resolve error within phpunit concerning assertRedirectTo() following zend framework 2.1 example, caused by trailing slash?

After following the Zend Framework 2 "Getting Started" tutorial successfully, I started on the Unit testing example for version 2.1 and, following it verbatim, I get a failure with PHPUnit: Failed asserting response redirects to "/album", actual…
shadowzen
  • 77
  • 2
  • 9