title: Codeigniter urls, doubled segment, like: news/news/
body: <p>I have completed the well known 'news' toutorial included in CI documentation. sometimes double 'news/' segment occurs in my linking strings like this: '/codeig/news/news/entry' and sometimes after reloading page everything works right. i should mention i have got rid of 'index.php' segment following another popular tutorial. what is wrong with my code ?</p>
  
  <p>this is my routing:</p>
  
  <pre><code>$route['news/create'] = 'news/create'; 
  $route['news/update/(:any)'] = 'news/update/$1';
  $route['news/delete/(:any)'] = 'news/delete/$1';
  $route['news/(:any)'] = 'news/view/$1';
  $route['news'] = 'news';
  $route['welcome'] = 'welcome';
  
  $route['auth/(:any)'] = 'auth/$1';
  $route['auth'] = 'auth';
  $route['activate/:num/:any'] = "/auth/activate/$1/$2";
  $route['reset_password/:num/:any'] = "/auth/reset_password/$1/$2";
  
  $route['(:any)'] = 'pages/view/$1';
  $route['default_controller'] = 'news';
  </code></pre>
  
  <p>views/news/index.php file:</p>
  
  <pre><code>&lt;?php foreach ($news as $news_item): ?&gt;
  
  &lt;h2&gt;&lt;?php echo $news_item['title'] ?&gt;&lt;/h2&gt;
  &lt;div id="main"&gt;
      &lt;?php echo $news_item['text'] ?&gt;
  &lt;/div&gt;
  &lt;p&gt;&lt;a href="news/&lt;?php echo $news_item['slug'] ?&gt;"&gt;View article&lt;/a&gt;&lt;/p&gt;
  
  &lt;?php endforeach ?&gt;
  </code></pre>
  
  <p>view method (news controller)</p>
  
  <pre><code>public function view($slug)
  {
  $data['news_item'] = $this-&gt;news_model-&gt;get_news($slug);
  
  if (empty($data['news_item']))
  {
      show_404();
  }
  
  $data['title'] = $data['news_item']['title'];
  
  $this-&gt;load-&gt;view('templates/header', $data);
  $this-&gt;load-&gt;view('news/view', $data);
  $this-&gt;load-&gt;view('templates/footer');
  }
  </code></pre>