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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T17:19:45+00:00 2026-05-28T17:19:45+00:00

I created a route to view users profiles: $router = Zend_Controller_Front::getInstance()->getRouter(); $route = new

  • 0

I created a route to view users profiles:

$router = Zend_Controller_Front::getInstance()->getRouter();
    $route  = new Zend_Controller_Router_Route(
            'profile/:username',
            array(
                'username'      => 'username',
                'module'        => 'core',
                'controller'    => 'profile',
                'action'        => 'view'   
            ) 
    );
    $router->addRoute('profile',$route);

When I go there, all of the urls within the page all now say http://127.0.0.1/project/public/profile.

How do I fix this?

  • 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-28T17:19:46+00:00Added an answer on May 28, 2026 at 5:19 pm

    If using the Url view helper or Zend_Navigation, you need to specify the route to use if you don’t want it to use the current one. For example…

    Url view helper

    Use the “default” route

    <?php echo $this->url(array(
        'action'     => 'index',
        'controller' => 'index'
    ), 'default', true) ?>
    

    Navigation config

    resources.navigation.pages.home.label      = "Home"
    resources.navigation.pages.home.action     = "index"
    resources.navigation.pages.home.controller = "index"
    resources.navigation.pages.home.module     = "default"
    
    ; Don't forget to set the route
    resources.navigation.pages.home.route      = "default"
    

    Addendum

    The easiest way to configure routes is via the Router resource. Try this in your configuration instead of the code you have

    resources.router.routes.profile.route               = "profile/:username"
    resources.router.routes.profile.defaults.module     = "core"
    resources.router.routes.profile.defaults.controller = "profile"
    resources.router.routes.profile.defaults.action     = "view"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to create a route with a Username... So the URL would
Using Restlet I have created a router for my Java application. From using curl,
I have Groups that has_many projects. I also created an order view that is
I would like to access profiles table from my Profile model which belongs_to :user
Here's the scoop: I've created a test app that allows users to create ideas
How do I pass the number in the route throught the view to my
So I've created a named route like follows: match 'deactivate/:id' => 'events#deactivateEvent', :constraints =>
I want to use URL such as /Image/sample.png I create route, but it does
I want to create a route like //Widgets/PerformanceTable/['best' or 'worst' to sort by performance
Is it possible to create a final route that catches all .. and bounces

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.