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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T20:09:58+00:00 2026-06-09T20:09:58+00:00

After creating a modular structure for a single module would prevent the url appears

  • 0

After creating a modular structure for a single module would prevent the url appears the name of the controller.

everything works with the defaul

site.con/foo/index/action/

I wish I could write as

site.com/foo/action/

being IndexController the only controller that module.

I have tested several solutions but do not work. Being the first app with ZF I do not quite clear the steps to be taken.

  • 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-09T20:09:59+00:00Added an answer on June 9, 2026 at 8:09 pm

    You need Zend Routes.

    Define routes in your

    bootstrap.php

    Open your bootstrap.php and put the following:

    function _initRoutes() {
            $front_controller = Zend_Controller_Front::getInstance();
            $router = $front_controller->getRouter();
            $router->addRoute('foo-action', new Zend_Controller_Router_Route(
                '<foo module name>/<action name>', array('module' => 'foo', 'controller' => 'index', 'action' => '<action-name>')
            ));
    }
    

    PS:Worked / Didn’t work?
    Mention in comments and if didn’t work, give proper names of module, controller and action.

    EDIT:

    How to set default controller / module in application.ini

    routes.index.type = "Zend_Controller_Router_Route"
    routes.index.route = "/"
    routes.index.defaults.module = "<module name>"
    routes.index.defaults.controller = "index"
    routes.index.defaults.action = "index"
    

    Solves it?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

After creating a new form, I usually perform this ritual: Change the name into
Is there some shortcut that would allow me after creating method in an interface,
After creating the new user object, how to get the group name of the
After creating a struct like this: type Foo struct { name string } func
I just changed the main activity name after creating the app and updated the
After creating a new object (Foo), I set the key (BarId) for an EntityRef
After creating a metaclass using Moose::Meta::Class->create , how do I instantiate a real Moose
After creating a child process and exiting it immediately (_exit()), I want to perform
After creating a div on the fly with this markup: $('.circuit').prepend(<div class='component' draggable='true'>TRANSISTOR</div>); It
After creating a table (by migration), I want to insert some entries directly. How

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.