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

  • Home
  • SEARCH
  • 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 6614987
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:24:24+00:00 2026-05-25T20:24:24+00:00

I have several templates: /admin/ /somecode1/somecode2/ /staticpage.htm Trying to enter on /admin/. Doing follow:

  • 0

I have several templates:

/admin/
/somecode1/somecode2/
/staticpage.htm

Trying to enter on /admin/. Doing follow:

$router->addRoutes(array(
      'adminsys' => new Zend_Controller_Router_Route('/:module/:controller/:action/*', array('module' => 'admin',  'controller' => 'index', 'action' => 'index')),
      'page_catalog' => new Zend_Controller_Router_Route('/:code/:page', array('module' => 'default', 'controller' => 'Staticcatalog', 'action' => 'index', 'code' => '', 'page' => '')),
      'static'       => new Zend_Controller_Router_Route_Regex('([\wА-Яа-я\-\_]+)\.(htm|html)', array('module' => 'default', 'controller' => 'static', 'action' => 'index')
));

also I tried to change ‘adminsys’ on :

 'adminsys' => new Zend_Controller_Router_Route('/admin/:controller/:action/*', array('module' => 'admin',  'controller' => 'index', 'action' => 'index')),

or

'adminsys' => new Zend_Controller_Router_Route('/admin/*', array('module' => 'admin',  'controller' => 'index', 'action' => 'index')),

But all time it routes on ‘page_catalog’.
If I comment it, I can enter /admin/. But not with ‘page_catalog’.

What I’m doing wrong here?

  • 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-25T20:24:24+00:00Added an answer on May 25, 2026 at 8:24 pm

    When you define routes, you define the general one first, and then you go more and more specific after. The router takes your routes ‘last one first’ and stops on the first that matches.

    This means that if ‘/admin’ could also work for the ‘page_catalog’ route, it would use this one, before even trying to match ‘adminsys’ route. And that’s the thing, ‘/admin’ could be a ‘page_catalog’ url where :code param would be ‘admin’.

    The second variant of the adminsys route is a good one, you just have to make it the last one of your routes in order to avoid any more general route to match first :

    $router->addRoutes(array(
          'page_catalog' => new Zend_Controller_Router_Route('/:code/:page', array('module' => 'default', 'controller' => 'Staticcatalog', 'action' => 'index', 'code' => '', 'page' => '')),
          'static'       => new Zend_Controller_Router_Route_Regex('([\wА-Яа-я\-\_]+)\.(htm|html)', array('module' => 'default', 'controller' => 'static', 'action' => 'index')),
          'adminsys' => new Zend_Controller_Router_Route('/admin/:controller/:action/*', array('module' => 'admin',  'controller' => 'index', 'action' => 'index'))
    ));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have several templates that match various nodes in an xml document. If I
I have several PDF templates that I would like to load and modify and
I have a index.php file that will include several external files: content/templates/id1/template.php content/templates/id2/template.php content/templates/id3/template.php
In my application I have various styles and templates that are used in several
I have been writing several class templates that contain nested iterator classes, for which
I have have a factory class, which needs to instantiate several templates with consecutive
We use MOSS 2007, and I have a document library with several document templates
I have read several articles regarding templates for web site content. They all seem
I have several Infopath form templates on my sharepoint site. Normally, I have to
I have several values I'm rendering as <li> elements on my template and 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.