title: How to remove index.php from URL in CodeIgniter using .htaccess
body: <p>I know this question is asked many times before and I've gone through most of them already but couldn't find a solution. I've tried most of the answers given <a href="https://stackoverflow.com/questions/19183311/codeigniter-removing-index-php-from-url" title="here">here</a>, <a href="https://stackoverflow.com/questions/35012466/how-to-remove-index-php-from-url-in-codeignitor" title="here">here</a> and in CodeIgniter official documentation. And restarted apache each time. It didn't work for me. <code>mod_rewrite</code> is already enabled in my apache server.</p>
  
  <p>Weird thing is, I've a working example for WAMP (in my laptop):</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
  RewriteEngine On
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php/$1 [L]
  &lt;/IfModule&gt;
  
  &lt;IfModule !mod_rewrite.c&gt;
  ErrorDocument 404 /project/index.php
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>It works perfectly in WAMP, but it doesn't work in LAMP. Any kind of help is appreciated.</p>