title: Zend FrameWork 2 Album tutorial Error : A 404 error occurred Page not found
body: <p>I am following the below tutorial to implement the [skeleton application][1].</p>
  
  <p>I have copy-pasted all the code provided in the tutorial, but I am getting the below error:</p>
  
  <blockquote>
    <p>A 404 error occurred</p>
    
    <p>Page not found.</p>
    
    <p>The requested URL could not be matched by routing.</p>
    
    <p>No Exception available</p>
  </blockquote>
  
  <p>I have cross checked all the similar issues in StackOverflow, but none of them were able to solve my issue.</p>
  
  <p>Can some one help me in this?</p>
  
  <p>Please find the below code.:</p>
  
  <p><strong><code>C:\wamp64\www\zend\module\Album\Module.php</code></strong></p>
  
  <pre><code>&lt;?php
  
  namespace Album;
  
  use Album\Model\AlbumTable;
  
  class Module
  {
      public function getAutoloaderConfig()
      {
          return array(
              'Zend\Loader\ClassMapAutoloader' =&gt; array(
                  __DIR__ . '/autoload_classmap.php',
              ),
              'Zend\Loader\StandardAutoloader' =&gt; array(
                  'namespaces' =&gt; array(
                      __NAMESPACE__ =&gt; __DIR__ . '/src/' . __NAMESPACE__,
                  ),
              ),
          );
      }
  
      public function getServiceConfig()
      {
          return array(
              'factories' =&gt; array(
                  'Album\Model\AlbumTable' =&gt;  function($sm) {
                      $dbAdapter = $sm-&gt;get('Zend\Db\Adapter\Adapter');
                      $table = new AlbumTable($dbAdapter);
                      return $table;
                  },
              ),
          );
      }    
  
      public function getConfig()
      {
          return include __DIR__ . '/config/module.config.php';
      }
  }
  </code></pre>
  
  <p>C:\wamp64\www\zend\module\Album\config\module.config.php</p>
  
  <pre><code>&lt;?php
  return array(
      'controllers' =&gt; array(
          'invokables' =&gt; array(
              'Album\Controller\Album' =&gt; 'Album\Controller\AlbumController',
          ),
      ),
  
      'router' =&gt; array(
          'routes' =&gt; array(
              'album' =&gt; array(
                  'type'    =&gt; 'segment',
                  'options' =&gt; array(
                      'route'    =&gt; '/album[/:action][/:id]',
                      'constraints' =&gt; array(
                          'action' =&gt; '[a-zA-Z][a-zA-Z0-9_-]*',
                          'id'     =&gt; '[0-9]+',
                      ),
                      'defaults' =&gt; array(
                          'controller' =&gt; 'Album\Controller\Album',
                          'action'     =&gt; 'index',
                      ),
                  ),
              ),
          ),
      ),
  
      'view_manager' =&gt; array(
          'template_path_stack' =&gt; array(
              'album' =&gt; __DIR__ . '/../view',
          ),
      ),
  );
  </code></pre>
  
  <p>Is there a way in zend to do a debug on where the issue is occurring?</p>
  
  <p>.htaccess file includes the below code</p>
  
  <pre><code>RewriteEngine On
  RewriteCond %{REQUEST_FILENAME} -s [OR]
  RewriteCond %{REQUEST_FILENAME} -l [OR]
  RewriteCond %{REQUEST_FILENAME} -d
  RewriteRule ^.*$ - [NC,L]
  RewriteRule ^.*$ index.php [NC,L]
  </code></pre>
  
  <p>vhost is as below</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
      ServerName zend
      DocumentRoot c:/wamp64/www/zend/public
      &lt;Directory  "c:/wamp64/www/zend/public/"&gt;
          Options +Indexes +FollowSymLinks +MultiViews
          AllowOverride All
          Require local
      &lt;/Directory&gt;
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>host is setup as</p>
  
  <pre><code>127.0.0.1       zend
  </code></pre>
  
  <p>I am trying to access the link as below</p>
  
  <p><a href="http://zend/album" rel="nofollow">http://zend/album</a></p>
  
  <p>C:\wamp64\www\zend\config\modules.config.php</p>
  
  <pre><code>return [
      'Zend\Router',
      'Zend\Validator',
      'Application',
      'Album',
  ];
  </code></pre>