Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7878225
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T03:35:58+00:00 2026-06-03T03:35:58+00:00

With Zend Framework Routing (Zend\Mvc\Router\RouteStack), how can I add a module to support user

  • 0

With Zend Framework Routing (Zend\Mvc\Router\RouteStack), how can I add a module to support user profile pages.

But I’d also like to have it fall through to support other pages/modules from the root directory like /rss or /search/asdf. This is my first guess with no luck…

'Zend\Mvc\Router\RouteStack' => array(
    'parameters' => array(
        'routes' => array(
            'default' => array(
                'type'    => 'Zend\Mvc\Router\Http\Segment',
                'options' => array(
                    'route'    => '/[:username[/:action]]',
                    'constraints' => array(
                        'username' => '[a-zA-Z][a-zA-Z0-9_-]*',
                        'action'     => '[a-zA-Z][a-zA-Z0-9_-]*',
                    ),
                    'defaults' => array(
                        'controller' => 'Application\Controller\UserController',
                        'action'     => 'index',
                    ),
                ),
            ),

URL examples …

  • https://github.com/weierophinney
  • https://github.com/weierophinney/following
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T03:36:00+00:00Added an answer on June 3, 2026 at 3:36 am

    Figured it out. Used Zend\Mvc\Router\Http\Regex matching at the very end of the Route tree …

                        'user' => array(
                            'type' => 'Zend\Mvc\Router\Http\Regex',
                            'options' => array(
                                'regex' => '/(?<id>[a-zA-Z0-9_-]+)',
                                'defaults' => array(
                                    'controller' => 'Application\Controller\IndexController',
                                    'action'     => 'user',
                                ),
                                'spec' => '/%id%',
                            ),
                        ),
                        'user-schedule' => array(
                            'type' => 'Zend\Mvc\Router\Http\Regex',
                            'options' => array(
                                'regex' => '/(?<id>[a-zA-Z0-9_-]+)/schedule',
                                'defaults' => array(
                                    'controller' => 'Application\Controller\IndexController',
                                    'action'     => 'schedule',
                                ),
                                'spec' => '/%id%/schedule',
                            ),
                        ),
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

can anyone tell me when it is better to use routing in zend framework?
In Zend framework, using the MVC, if A user surf explicitly to http://base/url/index.php instead
As you know, Zend Framework (v1.10) uses routing based on slash separated params, ex.
I am using Zend Framework with a MySQL database. Can zend select produce something
I am developing with Zend Framework and Eclipse 3.7.1 with PDT 3.0. I can't
Zend framework on mac OSX: can I change the root Directory ? how ?
Does Zend Framework has native Couch DB support? I found only Zend_Couch by Matthew
in zend framework, i usually setup vhosts so that i can refer to my
Zend Framework has Zend_Form_Element_Multiselect element. But I haven't found any examples how to extend
Zend Framework has this Run button... this works on individual php files. but i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.