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?
If using the
Url
view helper orZend_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
Navigation config
Addendum
The easiest way to configure routes is via the Router resource. Try this in your configuration instead of the code you have