title: CodeIgniter unexpectedly redirects to 404 page
body: <p>I am trying to make search engine but when I click on search button it goes to 404 page. Here is my view:</p>
  
  <pre><code>&lt;aside class="widget"&gt;
      &lt;h5&gt;SEARCH BLOG&lt;/h5&gt;
      &lt;form class="form-inline search" role="search" action="&lt;?php echo site_url('blog/search/');?&gt;" method = "post"&gt;
        &lt;div class="form-group"&gt;
          &lt;div class="input-group"&gt;
            &lt;input name="search" type="text" class="form-control" id="search" placeholder="Search"&gt;
            &lt;div class="input-group-addon"&gt;
              &lt;button  type="submit" class="btn btn-default"&gt;&lt;i class="fa fa-search"&gt;&lt;/i&gt;&lt;/button&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/form&gt;
  &lt;/aside&gt; 
  </code></pre>
  
  <p>Here is my model: </p>
  
  <pre><code>function blog_search($keyword) {
  
      $this-&gt;db-&gt;select('*');
      $this-&gt;db-&gt;from('news');
      $this-&gt;db-&gt;like('title_rus',$keyword);
      $this-&gt;db-&gt;like('body_rus',$keyword);
      $query = $this-&gt;db-&gt;get();
      return $query-&gt;result();
  
  }
  </code></pre>
  
  <p>Here is my controller:</p>
  
  <pre><code>function search() {
  
      $keyword = $this-&gt;input-&gt;post('search');
  
      $data['random_courses'] = $this-&gt;courses_model-&gt;get_random_course();
      $data['category'] = $this-&gt;news_model-&gt;get_category_for_sidebar ();
      $data['blog'] = $this-&gt;news_model-&gt;blog_search($keyword);
      echo '&lt;pre&gt;';
      print_r($data['blog']);
      echo '&lt;/pre&gt;'; die();
  
      $this-&gt;load-&gt;view('templates/header');
      $this-&gt;load-&gt;view('blog/blog', $data);
      $this-&gt;load-&gt;view('templates/footer');
  }
  </code></pre>