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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T15:19:38+00:00 2026-06-18T15:19:38+00:00

How to create an application where you can use URLs like Facebook? app.dev/username app.dev/username/pictures

  • 0

How to create an application where you can use URLs like Facebook?

  • app.dev/username
  • app.dev/username/pictures
  • app.dev/username/info
  • app.dev/username/posts/post_333
  • app.dev/username/posts/post_333/share

The application has other controllers with different URL’s

  • app.dev/events
  • app.dev/site/contact
  • app.dev/site/terms

When the controler does not exist, redirect to the profile controller

in application.ini

autoloaderNamespaces[] = "Plugins"
resources.frontController.plugins[] = "Plugins_Profiles"

in Bootstrapp.php

protected function _initProfiles()
{
    $front = Zend_Controller_Front::getInstance();
    $front->registerPlugin(new Plugins_Profiles());    
}

in /library/Plugin/Profiles.php

class Plugins_Profiles extends Zend_Controller_Plugin_Abstract
{

    public function preDispatch(Zend_Controller_Request_Abstract $request)
    {
        $dispatcher = Zend_Controller_Front::getInstance()->getDispatcher();

        if (!$dispatcher->isDispatchable($request)) {

            $url = $request->getControllerName();

            $request->setModuleName('default');
            $request->setControllerName('profiles');
            $request->setActionName('url');
            $request->setParam('url', $url);

            /** Prevents infinite loop if you make a mistake in the new request **/
            if ($dispatcher->isDispatchable($request)) {
                $request->setDispatched(false);
            }

        }

    }

}

But I can not send variables
Ex: app.dev/username/posts/post_333/share

Any idea how I should proceed?

PS. Sorry about the grammar, I am Brazilian and I speak Portuguese.

  • 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-18T15:19:39+00:00Added an answer on June 18, 2026 at 3:19 pm

    You should check out Zend_Controller_Router_Route to get a clean url. Here are some links to get started with clean-url and zend route.

    • Url-routing in zend framework
    • Simple Route example
    • Documentation for Zend_Controller_Router_Route
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to create an application which can learn to classify a sequence
Hi i want to create an application that works like spring quartz i can
I am trying to create an application can modify properties in IL to create
Problem I want to create an application that can be extended somehow by programmers.
I'm looking for a user interface language to create an application that can be
How to create a WPF application that can be deployed as either a XBAP
I want to create a navigation application but can't found any icons/symbols that suitable
Is it possible to create a Silverlight application which can be used to provide
What I need to do is create a web application that can run inside
Section 7.1.6 of the Modeshape docs say 'Your application can now create and remove

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.