title: Htaccess Yii 2 Configuration
body: <p>I am working on a Yii2 Project and have set it up on Wamp Localhost. My Wamp I have set up an alias:</p>
  <pre><code>Alias /project &quot;c:/Users/Shaun/Desktop/projects/project/web/&quot; 
  
  &lt;Directory &quot;c:/Users/Shaun/Desktop/projects/project/web/&quot;&gt;
      AllowOverride all
  &lt;/Directory&gt;
  </code></pre>
  <p>In a basic app I have placed the htaccess file into the web directory (where it is currently pointing to)</p>
  <blockquote>
  <p>project/web/.htaccess</p>
  <p>project/web/index.php</p>
  <p>project/web/index-test.php</p>
  </blockquote>
  <p>mod_rewrite is definitely enabled I have checked. I can navigate to my root without a problem:</p>
  <p>This is my htaccess file as demonstrated on Yii2 docs.</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
  
  
  http://localhost/project/
  </code></pre>
  <p>When I navigate to url above I hit my SiteController Index action fine. But when I try to go to for example:</p>
  <pre><code>http://localhost/project/site/index
  </code></pre>
  <p>It states:</p>
  <blockquote>
  <p>The requested URL /Users/Shaun/Desktop/projects/project/web/index.php was not found on this server.</p>
  </blockquote>
  <p>But it is definitely there?! If you see my web.php configuration as a component I have enabled:</p>
  <pre><code>'urlManager' =&gt; [
          'enablePrettyUrl' =&gt; true,
          'showScriptName' =&gt; false,
      ]
  </code></pre>
  <p>Still can't find it. But if I do this it shows the routes fine:</p>
  <pre><code>http://localhost/project/index.php/site/index
  </code></pre>
  <p>So frustrating as I don't want this. What's the deal here?</p>
  <p>Thanks,</p>