title: codeigniter pagination create_links()
body: <p>The problem is that in pagination, i haven't got the database things showing up yet, but the problem isn't in that. </p>
  
  <p>The problem is that I've got the page links showing up, but when I click the link to page 2, it goes to 
     <pre>http://127.0.0.1:8887/codeigniter-tests/index.php/pagination/index/127.0.0.1:8887/codeigniter-tests/index.php/pagination/index/5</pre>.</p>
  
  <p>As you can see, the link is basically repeated twice, now if I click 1 while on page 2, it takes me to
      <pre>http://127.0.0.1:8887/codeigniter-tests/index.php/pagination/index/127.0.0.1:8887/codeigniter-tests/index.php/pagination/index/127.0.0.1:8887/codeigniter-tests/index.php/pagination/index/</pre></p>
  
  <p>So as you can see, now it's written thrice, if I click 2 on this page it appends the url again and takes me there :/</p>
  
  <p>Now I would like to ask WHY IS THIS happening???</p>
  
  <p>Heres the code:_</p>
  
  <p>Controller(pagination.php)
      
  
  <p>class Pagination extends CI_Controller {</p>
  
  <pre><code>function index() {
      $this-&gt;load-&gt;library('pagination');
  
      $config['base_url'] = '127.0.0.1:8887/codeigniter-tests/index.php/pagination/index/';
      $config['total_rows'] = $this-&gt;db-&gt;get('data')-&gt;num_rows;
      $config['per_page'] = 5;
      $config['num_links'] = 10;
      $config['uri_segment'] = 3;
  
      $this-&gt;pagination-&gt;initialize($config);
  
      $data['records'] = $this-&gt;db-&gt;get('data', $config['per_page'], $config['uri_segment']);
      $this-&gt;load-&gt;view('pagination_view', $data);
  
  
  }
  
  }
  </code></pre>
  
  <p>Here's the view(pagination_view.php):_</p>
  
  <pre><code>&lt;html&gt;  
  &lt;head&gt;  
      &lt;title&gt;CI Pagination&lt;/title&gt;  
  &lt;/head&gt;  
  &lt;body&gt;  
      &lt;h1&gt;Pagination With CI&lt;/h1&gt; 
      &lt;?php
          echo $this-&gt;pagination-&gt;create_links();
      ?&gt;
  &lt;/body&gt;  
  &lt;/html&gt;  
  </code></pre>
  
  <p>Just a bit of extra info, if I set $config['base_url'] to nothing, it links to 
      <pre>127.0.0.1:8887/5</pre></p>
  
  <p>Any help would be appreciated, is this a bug?</p>