title: CodeIgniter | .htaccess removing index.php from url
body: <p>ok, i did exactly as asked in the documentation of codeigniter, created new file .htaccess</p>
  
  <pre><code>RewriteEngine on
  RewriteCond $1 !^(index\.php|images|robots\.txt)
  RewriteRule ^(.*)$ /index.php/$1 [L]
  </code></pre>
  
  <p>i am using xampp, so my url for accessing the site was</p>
  
  <pre><code>http://localhost:12/projects/zorkif_nextgen/index.php/main
  </code></pre>
  
  <p>now after applying the above .htaccess file, i tried it without index.php like this</p>
  
  <pre><code>http://localhost:12/projects/zorkif_nextgen/main
  </code></pre>
  
  <p>but instead of working, it is redirecting me to this url</p>
  
  <pre><code>http://localhost:12/xampp
  </code></pre>
  
  <p>How to resolve this issue?</p>
  
  <p>plus i am getting error on my page after trying the .htaccess</p>
  
  <p>on top of page message is appearing,</p>
  
  <pre><code> Error Occured.
  Warning!. Make sure you perform the correct action.
  The Action has been completed Successfully. 
  </code></pre>
  
  <hr>
  
  <p>Edit:</p>
  
  <p>Here is some of my config.php file settings</p>
  
  <pre><code>$config['base_url'] = '';
  $config['index_page'] = 'index.php';
  $config['uri_protocol'] = 'AUTO';
  $config['url_suffix'] = '';
  $config['enable_hooks'] = FALSE;
  $config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';
  $config['allow_get_array']      = TRUE;
  $config['enable_query_strings'] = FALSE;
  $config['controller_trigger']   = 'c';
  $config['function_trigger']     = 'm';
  $config['directory_trigger']    = 'd'; // experimental not currently in use
  $config['sess_cookie_name']     = 'zk_ci_session';
  $config['sess_expiration']      = 7200;
  $config['sess_expire_on_close'] = TRUE;
  $config['sess_encrypt_cookie']  = TRUE;
  $config['sess_use_database']    = TRUE;
  $config['sess_table_name']      = 'sys_ci_sessions';
  $config['sess_match_ip']        = FALSE;
  $config['sess_match_useragent'] = TRUE;
  $config['sess_time_to_update']  = 300;
  $config['csrf_protection'] = TRUE;
  $config['csrf_token_name'] = 'csrf_test_name';
  $config['csrf_cookie_name'] = 'csrf_cookie_name';
  $config['csrf_expire'] = 7200;
  $config['rewrite_short_tags'] = FALSE;
  </code></pre>