I have this JS function that's use a ZF2 helper to get the URL of my application:
function siteUrl(route){
var url = '<?php echo $this->url();?>';
if(route != null && route != ''){
url = url + route;
}
return url;
}
And it's return for me a address like this '/Program/MyProgramModule/public/index.php/controller' (notice that my application is not running in a Virtual Host).
But I want to get only the address without the Controller. I need it because I will make requests for another controller or module.
Thank!!