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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T01:14:55+00:00 2026-06-09T01:14:55+00:00

I have a module-based arhitecture in Zend Framework 1.11 (site.com/module/controller/action). I’ve setup my site

  • 0

I have a module-based arhitecture in Zend Framework 1.11 (site.com/module/controller/action).

I’ve setup my site to have a default module, so that if I have the site module as default, and you go to site.com/something1/something2, it will actually take you to site.com/site/something1/something2.

I want to achieve the same thing 1 level further: say if you go to site.com/something, it should take you to site.com/site/index/something. I’m not talking about a redirect, just a re-routing.

Would something like this be possible?

  • 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-09T01:14:57+00:00Added an answer on June 9, 2026 at 1:14 am

    If I understand correctly, it is possible and here is an example you can put in your Bootstrap:

    protected function _initControllerDefaults()
    {
        $this->bootstrap('frontcontroller');
        $front = Zend_Controller_Front::getInstance();
    
        // set default action in controllers to "something" instead of index
        $front->setDefaultAction('something');
    
        // You can also override the default controller from "index" to something else
        $front->setDefaultControllerName('default');
    }
    

    If you need the default action name to be dynamic based on the URL accessed, then I think you are looking for a custom route. In that case try:

    protected function _initRoutes()
    {
        $router = Zend_Controller_Front::getInstance()->getRouter();
    
        // Custom route:
        // - Matches  : site.com/foo or site.com/foo/
        // - Routes to: site.com/site/index/foo
    
        $route = new Zend_Controller_Router_Route_Regex(
                '^(\w+)\/?$',
                array(
                    'module'     => 'site',
                    'controller' => 'index',
                ),
                array(1 => 'action')
        );
        $router->addRoute('actions', $route);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to create module based structure, Like in zend framework. Suppose I have
I have a very module-based architecture in my infosystem that is installed to hundreds
I'm starting to familiarize myself with using the module-based architecture for zend framework projects.
I have module application. When I run it, the main window of that app
I have module that implements custom content type via NodeAPI hooks ( hook_insert ,
I'm making a task-based program that needs to have plugins. Tasks need to have
I have a module something like this, in lib, called Fool.pm, which is based
I have a module that is used by creating a custom class loader. The
If I have a Python module implemented as a directory (i.e. package) that has
I have been using Python's pickle module for implementing a thin file-based persistence layer.

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.