title: PostsController::index() was not found - CakePHP
body: <p>I am trying to get my hands on cakephp. So I started off with the cakephp demo Blog Application. I followed the first few steps of the tutorial and when I trying to load the posts controller it says </p>
  
  <pre><code>Missing View
  Error: The view for PostsController::index() was not found.
  
  Error: Confirm you have created the file: T:\Project Folders\NetBeans\cakeBlog\app\View\Posts\index.ctp
  </code></pre>
  
  <p>I searched a lot about this both in stackoverflow , cakephp forum and even in googlegroups but none of the solutions seems to work from me. Most of the solutions posted are as follows:</p>
  
  <ol>
  <li><p>Check if mod_rewrite is enabled -- Yes I have it enabled.</p></li>
  <li><p>Check if you named the index.ctp as index.ctp not index.cpt , Index.ctp or any other variant. -- Yes I have placed the index as follows app/views/Posts/index.ctp (using netbeans wizard)</p></li>
  <li><p>Use  tags instead of php short tags-- I am using the conventional Tag</p></li>
  </ol>
  
  <p><strong>Development Environment</strong></p>
  
  <p>Web Server - WAMP
  I created an alias named <code>cakeblog</code> and pointed it to <code>cakephp_folder/app/webroot/</code></p>
  
  <p><strong><em>cakeblog.conf</em></strong></p>
  
  <pre><code>Alias /cakeblog/ "T:\Project Folders\NetBeans\cakeBlog\app\webroot/" 
  
  &lt;Directory "T:\Project Folders\NetBeans\cakeBlog\app\webroot/"&gt;
      Options Indexes FollowSymLinks MultiViews
      AllowOverride all
          Order allow,deny
      Allow from all
  &lt;/Directory&gt;
  </code></pre>
  
  <p><strong><em>app/webroot/.htaccess</em></strong></p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
      RewriteEngine On
      RewriteBase /cakeblog
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteRule ^ index.php [L]
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>I also loaded the localization and the debugkit Plugin. I simply placed the exacted folders into app/plugin and added the following in bootstrap.php</p>
  
  <p><strong><em>bootstrap.php</em></strong></p>
  
  <pre><code>CakePlugin::load('DebugKit'); //Loads a single plugin named DebugKit
  CakePlugin::load('Localized');
  </code></pre>
  
  <p><strong><em>core.php</em></strong></p>
  
  <pre><code>Configure::write('debug', 1);
  </code></pre>
  
  <p>I am able to launch the application and I am seeing the welcome page well and fine. I have attached an snapshot of it in startup.png</p>
  
  <p><img src="https://i.stack.imgur.com/XmPNx.png" alt="startup"></p>
  
  <p>Now , let me paste the code, which I simply copy pasted from the tutorial:</p>
  
  <p><strong>app/model/post.php</strong></p>
  
  <pre><code>   &lt;?php
      class Post extends AppModel {
          //put your code here
      }
      ?&gt;
  </code></pre>
  
  <p><strong>app/controller/PostsController.php</strong></p>
  
  <pre><code>&lt;?php
  
    class PostsController extends AppController {
      //put your code here
      public $helpers = array('Html', 'Form');
  
       public function index() {
          $this-&gt;set('posts', $this-&gt;Post-&gt;find('all'));
      }
       public function view($id = null) {
          if (!$id) {
              throw new NotFoundException(__('Invalid post'));
          }
  
          $post = $this-&gt;Post-&gt;findById($id);
          if (!$post) {
              throw new NotFoundException(__('Invalid post'));
          }
          $this-&gt;set('post', $post);
      }
  }
  
  ?&gt;
  </code></pre>
  
  <p><strong>app/view/Pages/Posts/index.ctp</strong></p>
  
  <pre><code>&lt;!-- File: /app/View/Posts/index.ctp --&gt;
  
  &lt;h1&gt;Blog posts&lt;/h1&gt;
  &lt;table&gt;
      &lt;tr&gt;
          &lt;th&gt;Id&lt;/th&gt;
          &lt;th&gt;Title&lt;/th&gt;
          &lt;th&gt;Created&lt;/th&gt;
      &lt;/tr&gt;
  
      &lt;!-- Here is where we loop through our $posts array, printing out post info --&gt;
  
      &lt;?php foreach ($posts as $post): ?&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;?php echo $post['Post']['id']; ?&gt;&lt;/td&gt;
          &lt;td&gt;
              &lt;?php echo $this-&gt;Html-&gt;link($post['Post']['title'],
  array('controller' =&gt; 'posts', 'action' =&gt; 'view', $post['Post']['id'])); ?&gt;
          &lt;/td&gt;
          &lt;td&gt;&lt;?php echo $post['Post']['created']; ?&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;?php endforeach; ?&gt;
      &lt;?php unset($post); ?&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>Kindly check the attachment output.png for the snapshot of the output I am receiving for <code>http://localhost/cakeblog/posts</code>:</p>
  
  <p><img src="https://i.stack.imgur.com/vZXL0.png" alt="output"></p>