title: CodeIgniter's URI and form action
body: <p>let's say we are on</p>
  
  <pre><code>somesite.com/mail
  </code></pre>
  
  <p>it means we are using controller named 'mail'. This controller has function:</p>
  
  <pre><code>public function index(){ 
          $this-&gt;load-&gt;view('header');
          $this-&gt;load-&gt;view('mail/contact_form');
          $this-&gt;load-&gt;view('footer');
  
      }
  </code></pre>
  
  <p>This function is loaded when we type in adress bar just</p>
  
  <pre><code>somesite.com/mail
  </code></pre>
  
  <p>and press enter (no additional arguments). And let's see first line of the contact_form view:</p>
  
  <pre><code>&lt;form role="form" method="post" action="sendmail"&gt;
  </code></pre>
  
  <p>And that's my problem. When I type adress with backslash on the end like this:</p>
  
  <pre><code>mysite.com/mail/
  </code></pre>
  
  <p>and use my contact formula, everything works good and my Mail controller loads function sendmail and the URL is now:</p>
  
  <pre><code>mysite.com/mail/sendmail/
  </code></pre>
  
  <p>But when I forget about backslash (mysite.com/mail), it looks for controller named "sendmail" but I don't want it. My url is then:</p>
  
  <pre><code>mysite.com/sendmail
  </code></pre>
  
  <p>but of course I don't have any controllers named sendmail. My question is - how to change action of my formula or what should I do to make this working good? Is the only answer to remember about backslash or what?</p>