title: CodeIgniter remove index.php apache mod_rewrite
body: <p>I'm using CodeIgniter on a Windows machine using the Zend Comunity Server with apache. My apache is properly configured to handle .htaccess directives and mod_rewrite is enabled (httpd.conf): </p>
  
  <pre><code>&lt;Directory /&gt;
      Options FollowSymLinks
      AllowOverride FileInfo
      Order deny,allow
      Deny from all
  &lt;/Directory&gt;
  </code></pre>
  
  <p>My root is <code>C:\www\</code> and my site is located in <code>C:\www\david\</code> and when I type <code>http://localhost/david/</code>, the index.php is loaded along with the correct controller. I want to access my things directly through <code>http://localhost/david/Articles/</code> instead of <code>http://localhost/david/index.php/Articles/</code>. To do this I have to use apache rewrite module.</p>
  
  <p>To do so, I've placed a <code>.htaccess</code>file in the <code>C:\www\david\</code> folder. This file contains code I found on <a href="http://codeigniter.com/wiki/mod_rewrite/" rel="nofollow">here</a> :</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
      RewriteEngine On
      RewriteBase /david/
  
      #Removes access to the system folder by users.
      #Additionally this will allow you to create a System.php controller,
      #previously this would not have been possible.
      #'system' can be replaced if you have renamed your system folder.
      RewriteCond %{REQUEST_URI} ^core.*
      RewriteRule ^(.*)$ /index.php?/$1 [L]
  
      #When your application folder isn't in the system folder
      #This snippet prevents user access to the application folder
      #Submitted by: Fabdrol
      #Rename 'application' to your applications folder name.
      RewriteCond %{REQUEST_URI} ^application.*
      RewriteRule ^(.*)$ /index.php?/$1 [L]
  
      #Checks to see if the user is attempting to access a valid file,
      #such as an image or css document, if this isn't true it sends the
      #request to index.php
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule ^(.*)$ index.php?/$1 [L]
  &lt;/IfModule&gt;
  
  &lt;IfModule !mod_rewrite.c&gt;
      # If we don't have mod_rewrite installed, all 404's
      # can be sent to index.php, and everything works as normal.
      # Submitted by: ElliotHaughin
  
      ErrorDocument 404 /index.php
  &lt;/IfModule&gt; 
  </code></pre>
  
  <p>I made a couple of changes to the code since my configuration is a bit different from the default. I'm not on the root so : 'RewriteBase /davidfrancoeur.com/' and I've renamed the CodeIgniter system folder for additional security so : 
      RewriteCond %{REQUEST_URI} ^core.*
      RewriteRule ^(.*)$ /index.php?/$1 [L]</p>
  
  <p>With this done, anything should work properly, I should be able to access <code>http://localhost/david/Articles/</code> without a problem and I think I shouldn't be able to reach <code>http://localhost/david/core/config/config.php</code> directly.</p>
  
  <p>Unfortunately, it doesn't work, it doesn't even look like any rewriting is done. Do you see if I'm doing something wrong here? Is there a way to know if apache actually rewrite anything?</p>
  
  <p>Thanks a lot. And yes I looked at the millions of article I could found about this... :(</p>
  
  <p><strong>EDIT</strong> </p>
  
  <p>CI 2.0.2, PHP 5.3, Apache 2.2</p>