Reputation: 1106
got a bit of a problem with Zend not adding the base url into routes i think.
What i have is as follows:
application
modules
menu
public
menu
css
js
index.php
index.base.php
I am using the function
<?php echo $this->url(array('module' => 'module1'), 'menu-install'); ?>
With the route:
$router->addRoute('menu-install', new Zend_Controller_Router_Route('/install/:modulePath', array('module' => 'menu', 'controller' => 'install', 'action' => 'install')));
Which is outputting http://menu/install/module1/ instead of http://localhost:8888/menu/install/module1/
Any ideas whats going on?
Upvotes: 0
Views: 558
Reputation: 3350
Normally, the URL View Helper return only the URI after the without the domain ; than
<?php echo $this->url(array('module' => 'module1'), 'menu-install'); ?>
Write something like this:
/menu/install/module1/
Where:
Perhaps, you have write "http://" before the ?
An other possibility is that you have a mistake with your parameters "module" and the "Module" mechanics of Zend_Framework...
Aka
Upvotes: 1
Reputation: 3565
Try ro write this(in bootstrap for example)
Zend_Controller_Front::getInstance()->setBaseUrl('/');
Upvotes: 1