title: codeigniter delete 404 error
body: <p>I have added a delete link to the articles page, but when I click delete, in the URL its says ..........index.php/news/delet1 it picks out the id but comes up with a 404 error.</p>
  
  <p>controller news.php</p>
  
  <pre><code>public function delete($id){
      $id = $this-&gt;uri-&gt;segment(3);
  
      $data['title'] = 'Delete an item';
  
      if($this-&gt;news_model-&gt;delete_news($id)){
          $this-&gt;load-&gt;view('templates/header', $data);  
          $this-&gt;load-&gt;view('news/success');
          $this-&gt;load-&gt;view('templates/footer');
      }
  }
  </code></pre>
  
  <p>view.php</p>
  
  <pre><code>&lt;p&gt;&lt;a href="news/delete&lt;?php echo $news_item['id'] ?&gt;"&gt;delete article&lt;/a&gt;&lt;/p&gt;
  </code></pre>
  
  <p>news_model.php</p>
  
  <pre><code>public function delete_news($id){
      $this-&gt;db-&gt;where('id',$id)-&gt;delete('news');
  
      return $this-&gt;db-&gt;affected_rows();
  }
  </code></pre>
  
  <p>route</p>
  
  <pre><code>$route['news/delete/(:num)'] = 'news/delete/$1';
  </code></pre>
  
  <p>Help would be appreciated.</p>