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 7556617
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T11:54:15+00:00 2026-05-30T11:54:15+00:00

in my project I’m using zend to handle routing. Atm we’ve got routing rules

  • 0

in my project I’m using zend to handle routing. Atm we’ve got routing rules which looks like this:
array(
‘match’ => ‘page’,
‘params’ => array(‘page’, ‘idConfiguration’),
‘controller’ => ‘controler1’,
‘action’ => ‘action1’
)

So we access this action by: http://base_url/page/1/1223324 for example.

Is there a simple solution to create rules so i can determine which action is called based on number of params?

I’d like it to look the following way:
http://base_url/ – action 0
http://base_url/pageNumber – action 1
http://base_url/pageNumber/idConfiguration – action 2
http://base_url/pageNumber/idConfiguration/someotherparam – action 3

Thank you in advance for help

  • 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-05-30T11:54:16+00:00Added an answer on May 30, 2026 at 11:54 am

    Ini-based solution (hope I understand what you want):

    routes.action0.route = "/:pageNumber"
    routes.action0.defaults.controller = "controller0"
    routes.action0.defaults.action = "action0"
    routes.action0.reqs.pageNumber = "\d+"
    
    routes.action1.route = "/:pageNumber/:idConfiguration"
    routes.action1.defaults.controller = "controller1"
    routes.action1.defaults.action = "action1"
    routes.action1.reqs.pageNumber = "\d+"
    routes.action1.reqs.idConfiguration= "\d+"
    
    routes.action2.route = "/:pageNumber/:idConfiguration/:someOtherParam"
    routes.action2.defaults.controller = "controller2"
    routes.action2.defaults.action = "action2"
    routes.action2.reqs.pageNumber = "\d+"
    routes.action2.reqs.idConfiguration= "\d+"
    routes.action2.reqs.someOtherParam = "someOtherRegEx"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Python project looks like this: setup.py README Application scripts hello.py shell_scripts date.sh From hello.py
My project is currently using a svn repository which gains several hundred new revisions
Project: ASP.NET 3.5 with C# I have this much :- A table which used
My project has viewmodels labeled like this: public class locViewModel { [Required] public string
About project: I'm trying to write CMS-like web-site on Java. Previously I used PHP
Our project is using Ransack at the moment, we are thinking to introduce Thinking-Sphinx.
Project Euler 126 says: If we then add a second layer to this solid
Project I've developed a remoting class which is used to replace a subset of
My project takes a query string as an argument and searches a directory using
project: Using VB.NET to build a winforms database interface and work-automation app. I am

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.