title: Yii 2.0 restful routing 404 issue
body: <p>I am trying to follow the Yii2.0 example as found here with my simple product table
  instead of User.</p>
  
  <p><a href="http://www.yiiframework.com/doc-2.0/guide-rest-quick-start.html" rel="nofollow">http://www.yiiframework.com/doc-2.0/guide-rest-quick-start.html</a></p>
  
  <p>I'm using the basic package, not advanced.</p>
  
  <p>When I try to access localhost/product
  I get a 404 error.</p>
  
  <p>When I use localhost/index.php or localhost/index.php/gii
  I get the expected result (the default homepage, and the gii tool).</p>
  
  <p>Here is what I'm working with.</p>
  
  <p>The config file web.php</p>
  
  <pre><code>$params = require(__DIR__ . '/params.php');
  
  $config = [
  'id' =&gt; 'basic',
  'basePath' =&gt; dirname(__DIR__),
  'bootstrap' =&gt; ['log'],
  'components' =&gt; [
  
      'request' =&gt; [
          // !!! insert a secret key in the following (if it is empty) - this is required     by cookie validation
          'cookieValidationKey' =&gt; 'xxx',
          'parsers' =&gt; [
              'application/json' =&gt; 'yii\web\JsonParser',
          ],
      ],
      'urlManager' =&gt; [
          'enablePrettyUrl' =&gt; true,
          'enableStrictParsing' =&gt; true,
          'showScriptName' =&gt; false,
          'rules' =&gt; [
              ['class' =&gt; 'yii\rest\UrlRule', 'controller' =&gt; 'product'],
          ],
      ],
      'cache' =&gt; [
          'class' =&gt; 'yii\caching\FileCache',
      ],
      'user' =&gt; [
          'identityClass' =&gt; 'app\models\User',
          'enableAutoLogin' =&gt; true,
      ],
      'errorHandler' =&gt; [
          'errorAction' =&gt; 'site/error',
      ],
      'mailer' =&gt; [
          'class' =&gt; 'yii\swiftmailer\Mailer',
          // send all mails to a file by default. You have to set
          // 'useFileTransport' to false and configure a transport
          // for the mailer to send real emails.
          'useFileTransport' =&gt; true,
      ],
      'log' =&gt; [
          'traceLevel' =&gt; YII_DEBUG ? 3 : 0,
          'targets' =&gt; [
              [
                  'class' =&gt; 'yii\log\FileTarget',
                  'levels' =&gt; ['error', 'warning'],
              ],
          ],
      ],
      'db' =&gt; require(__DIR__ . '/db.php'),
  ],
  'params' =&gt; $params,
  ];
  
  if (YII_ENV_DEV) {
      // configuration adjustments for 'dev' environment
      $config['bootstrap'][] = 'debug';
      $config['modules']['debug'] = 'yii\debug\Module';
  
      config['bootstrap'][] = 'gii';
      $config['modules']['gii'] = 'yii\gii\Module';
  }
  
  return $config;
  </code></pre>
  
  <p>The Model Product.php</p>
  
  <pre><code>    namespace app\models;
  
  use yii\db\ActiveRecord;
  
  /**
   * This is the model class for table "product".
   *
   * @property integer $ProductID
   * @property string $Name
   * @property double $Price
   * @property string $ShortDesc
   * @property string $LongDesc
   * @property string $PicUrl
   */
  class Product extends ActiveRecord
  {
      /**
       * @inheritdoc
       */
      public static function tableName()
      {
          return 'product';
      }
  
      /**
       * @inheritdoc
       */
      public function rules()
      {
          return [
              [['Price'], 'number'],
              [['ShortDesc', 'LongDesc', 'PicUrl'], 'string'],
              [['Name'], 'string', 'max' =&gt; 60]
          ];
      }
  
      /**
       * @inheritdoc
       */
      public static function primaryKey()
      {
          return ['ProductID'];
      }
  
  
      /**
       * @inheritdoc
       */
      public function attributeLabels()
      {
          return [
              'ProductID' =&gt; 'Product ID',
              'Name' =&gt; 'Name',
              'Price' =&gt; 'Price',
              'ShortDesc' =&gt; 'Short Desc',
              'LongDesc' =&gt; 'Long Desc',
              'PicUrl' =&gt; 'Pic Url',
          ];
      }
  }
  </code></pre>
  
  <p>The controller ProductController.php</p>
  
  <pre><code>use yii\rest\ActiveController;
  
  class ProductController extends ActiveController
  {
      public $modelClass = 'app\models\Product';
  }
  </code></pre>
  
  <p>I have tried to turn off 'enableStrictParsing' and set $pluralize to false, with no luck.</p>
  
  <p>I have also tried adding this .htaccess file which gave me a 500 rather than a 404.</p>
  
  <pre><code>RewriteEngine on
  
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . index.php
  </code></pre>
  
  <p>I'm sure I've done something silly here, but anyone willing to point that out will be a huge help.</p>
  
  <p>Thanks!</p>