title: Remove "index.php" from URL - Codeigniter
body: <p>I've looked in the documentation of Codeigniter of removing the <code>index.php</code> from the URL when accessing different views, the code shows how to remove it with apache:</p>
  
  <pre><code>RewriteEngine on
  RewriteCond $1 !^(index\.php|images|robots\.txt)
  RewriteRule ^(.*)$ /index.php/$1 [L]
  </code></pre>
  
  <p>However, when I go to <code>http://localhost/code/home</code>, I get this:</p>
  
  <blockquote>
    <p>The requested URL /code/home was not found on this server.</p>
  </blockquote>
  
  <p>But accessing <code>http://localhost/code/index.php/home</code> works just fine, how come it isn't working for me?</p>
  
  <p>I'm on a Mac OS X Snow Leopard using the <code>Sites</code> directory: <code>/Users/~myusername~/Sites/code</code>, and I'm not using any software, i.e. MAMP, XAMPP.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>For the <code>sudo /usr/sbin/apachectl -k restart -S</code> command, I get this:</p>
  
  <pre><code>VirtualHost configuration:
  wildcard NameVirtualHosts and _default_ servers:
  *:80                   is a NameVirtualHost
           default server code.local (/private/etc/apache2/httpd.conf:146)
           port 80 namevhost code.local (/private/etc/apache2/httpd.conf:146)
  Syntax OK
  </code></pre>