Is there a way to set up hostname based routing in Symfony2?
I didn\'t find anything about this topic in the official documentation.
http://sy
Alternatively get hostname in the controller:
class DefaultController extends PowmaController {
/**
* @Route("/test")
*/
public function testAction() {
return new Response( 'Hostname ' . $this->getRequestHostnameString() );
}
function getRequestHostnameString() {
return $this->getRequest()->getHost();
}