Hi,
I would like to keep my port number which is different on production and development environment, but calls to the url helper based on my zend routes forget the port number.
My routes are a bunch of regexp routes, chaining with default hostname routes, mainly for multilanguage over a multidomain configuration (short overview below).
<?php
$routecateg = new Zend_Controller_Router_Route_Regex('cat/(\w+)_([^_]+)(?:_page_(\d+))?(?:_par_(\d+))?(?:.html)?',
array(1 =>'',2=>'',3=>'1',4=>'20','controller' =>'list','action'=>'categ'),
array(1 =>'categid',2=>'categname',3=>'page',4=>'par'),
'cat/%s_%s_page_%d_par_%d.html'
);
$routeindex= new Zend_Controller_Router_Route_Regex('(index|home)?',
array('controller' =>'index','action'=>'home'),
array(),
'index'
);
$hostRouteRepository = new Zend_Controller_Router_Route_Hostname(
':lang.'.$config->serverurl
);
$router ->addRoute('index',$hostRouteRepository->chain($routeindex));
$router ->addRoute('categ',$hostRouteRepository->chain($routecateg));
?>
Where $config->serverurl is just the domainname depending on environment and configured in my application.ini file.
On my production server, it's ok, as i am running on default port 80, but on developmenet, I need to run on a different port, and each time i call my url helper, port number is forgotten.
I know i can workaround by better configuring my apache server, but i'm surprised to not find any solutions to this issue.