title: htaccess codeigniter remove index.php
body: <p>I have hosted codeigniter application in apache2.4 with php7.2 docker environment. Not able to resolve routes correctly.</p>
  
  <p>PATH</p>
  
  <blockquote>
    <p>/var/www/html/apps/sample1</p>
  </blockquote>
  
  <p>browser PATH</p>
  
  <blockquote>
    <p><a href="http://localhost:8080/apps/sample1/" rel="nofollow noreferrer">http://localhost:8080/apps/sample1/</a></p>
  </blockquote>
  
  <p>working fine but routes controller and actions is not get resolved until i use index.php</p>
  
  <blockquote>
    <p><a href="http://localhost:8080/apps/sample1/index.php/admin/logn" rel="nofollow noreferrer">http://localhost:8080/apps/sample1/index.php/admin/logn</a></p>
  </blockquote>
  
  <p><strong>Correct Expectation</strong> </p>
  
  <blockquote>
    <p><a href="http://localhost:8080/apps/sample1/admin/logn" rel="nofollow noreferrer">http://localhost:8080/apps/sample1/admin/logn</a></p>
  </blockquote>
  
  <p>.htaccess current configuration, Apache mod_rewrite already enabled </p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
      RewriteEngine On
      RewriteBase /app/innovative_travel_web/
      RewriteRule ^index\.php$ - [L]
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule . /index.php [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;  
  &lt;IfModule mod_php5.c&gt;
    php_value short_open_tag 1
    php_value upload_max_filesize 20M
    php_value post_max_size 20M
    php_value max_execution_time 200
    php_value max_input_time 200
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>Kindly please guide me, how can i fix it.</p>