title: Codeigniter htaccess and base_url
body: <p>I install codeigniter and start to write some code on it.First i want to remove index.php and make some research about it.I remove it with a small htaccess code below,</p>
  
  <pre><code>RewriteEngine on
  RewriteCond $1 !^(index\.php|images|css|robots\.txt)
  RewriteRule ^(.*)$ /pasaj/index.php/$1 [L]
  </code></pre>
  
  <p>and then set my base_url in config.php as,</p>
  
  <pre><code>$config['base_url'] = 'http://localhost/pasaj/'; 
  </code></pre>
  
  <p>and then i decided to use base_url in form's actions</p>
  
  <p>and wrote it like that(please look at action)</p>
  
  <pre><code>  &lt;form method="post" id="formSubmit" name="fSubmit" action=&lt;?php base_url(); ?&gt;"kayit/kayitOnay/"&gt;
  </code></pre>
  
  <p>but it did not work </p>
  
  <p>and prints url like that <br />
  <img src="https://i.stack.imgur.com/RMypL.png" alt="enter image description here"></p>
  
  <p>what i did all is not working </p>
  
  <p>and i suspect from my htaccess file.I removed it. i use it for removing index.php in codeigniter default.</p>
  
  <p>and set my new
  base url like that necessarily</p>
  
  <pre><code>http://localhost/pasaj/index.php/
  </code></pre>
  
  <p>and do not change anything above form code</p>
  
  <p>and it works.</p>
  
  <p>Now, i want to still use this htaccess file in order to remove index.php but when  htaccess file exists my base_url works wrongly . What might be the changes in htaccess file ? </p>