title: Codeigniter cannot find controller
body: <p>I am using Codeigniter 3. When running on local wamp server, all is good. But, when running on my VPS (Linux Debian Apache 2.2.22) I get a 'URL not found' message.</p>
  
  <p>here is the controller:   </p>
  
  <pre><code>&lt;?php
  defined('BASEPATH') OR exit('No direct script access allowed');
  
      class Contact extends CI_Controller {
        public function __construct()
        {
          parent::__construct();
          $this-&gt;load-&gt;helper('url');
          $this-&gt;load-&gt;library('session');
          $this-&gt;load-&gt;helper('form');
      }
  
      public function index()
      {
        $this-&gt;load-&gt;view('contact_view');
      }
    }
  </code></pre>
  
  <p>My URL to this controller is www.example.com/Contact  </p>
  
  <p>Error message is: </p>
  
  <blockquote>
    <p>The requested URL /index.php/Contact was not found on this server.</p>
  </blockquote>
  
  <p>I have removed index.php from <code>$config['index_page'] = ''</code></p>
  
  <p>In my .htaccess file, I am using rewrite to eleminite the need for index.php in URLs, using this:</p>
  
  <p><code>RewriteEngine on
  RewriteCond $1 !^(index\.php|resources|robots\.txt)
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php/$1 [L,QSA]</code></p>
  
  <p>The directives on my virtual host are:<br>
  <code>&lt;Directory "/var/www/example"&gt;
  Options Indexes FollowSymLinks
  AllowOverride All
  Order allow,deny
  Allow from all
  &lt;/Directory&gt;</code></p>
  
  <p>mod_rewrite is definitely enabled on virtual host.</p>
  
  <p>Everything works fine on my local machine, running Wampserver, but why does it not work on my VPS?</p>