title: Yii2 - subdomain routing
body: <p>I want to use subdomain as id, and I need dynamic router to do this. In <strong>urlManager</strong>, I added this line:</p>
  
  <pre><code>"http://&lt;user:\w+&gt;.local.dev/&lt;controller:\w+&gt;/&lt;action&gt;" =&gt; '&lt;controller&gt;/&lt;action&gt;',
  </code></pre>
  
  <p>When I try any action, for example:</p>
  
  <pre><code>function actionMyAccount($user){
  echo $user;...
  }
  </code></pre>
  
  <p>I am not getting anything - the var isn't printed, and script stops working (screen is white). When I remove $user, the page is loading without any problems</p>
  
  <p>How can I achieve subdomain router? </p>