Routes Including Host Part

Hi guys.

I’m trying to deal with routes that include host part.

Here’s what I found:

$request->getHostInfo() at UrlRule::parseRequest() (line 201) returns, but $this->pattern (a couple of lines lower) equals to #^$#u so preg_match() fails.

There are no routing docs yet, so I suppose I can have missed something.

Here’s my test route:


    'host' => '',

    'pattern' => '',

    'route' => 'mycontroller/index',


I believe Yii Guide has section for routing with hostname check the guide under Url Managment


I am not sure if this is what you need but here is link knock yourself out

I’m talking about Yii2. In Yii1 everything works fine.

Dude you did not mention Yii2 only now

See subforum name.