title: Yii2 + AngularJS
body: <p>I have a problem with integrating Angular and Yii2
  I have 2 parts:</p>
  
  <ol>
  <li>Regular Yii2 app </li>
  <li>Controller which starts with actionIndex and work with Angular</li>
  </ol>
  
  <p>The problem is, when i copy and paste url in Angular part i always get 404 error. Angular config is</p>
  
  <pre><code>.config(function($routeProvider, $locationProvider) {
      base = '/construct/';
      $routeProvider.when(base+':className', {
        templateUrl: '/construct/builder',
        controller: 'BuilderCtrl',
        reloadOnSearch: false
      }).otherwise({
        templateUrl: '/construct/heroes',
        controller: 'HeroesCtrl'
      });
  
      $locationProvider.html5Mode(true);
    });
  </code></pre>
  
  <p>So, how can i make direct links in HTML5 mode work to see proper pages?
  Path like "/construct/something" doesn't work.
  My htaccess is:</p>
  
  <pre><code>RewriteEngine on
  
  # If a directory or a file exists, use the request directly
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  # Otherwise forward the request to index.php
  RewriteRule . index.php
  </code></pre>