title: CodeIgniter Pagination Problem
body: <p>I am using codeigniter and its pagination class. It works perfectly and it looks something like this:</p>
  
  <blockquote>
    <p>« First  &lt; <strong>1</strong> 2 3 4 5 >  Last »</p>
  </blockquote>
  
  <p>Here is my code:</p>
  
  <pre><code>$this-&gt;load-&gt;library('pagination');
  $config['base_url'] = base_url().'controlpanel/';
  $config['first_link'] = 'First';
  $config['total_rows'] = $count;
  $config['per_page'] = '3'; 
  $this-&gt;pagination-&gt;initialize($config); 
  $data['pagination'] = $this-&gt;pagination-&gt;create_links();
  $this-&gt;load-&gt;view('controlpanel', $data);
  </code></pre>
  
  <p>I have this in my routes:</p>
  
  <pre><code>$route['controlpanel/(:num)'] = "controlpanel/index/$1";
  </code></pre>
  
  <p>However, whenever I get to a differentpage i.e. <code>controlpanel/3</code> - the number 1 is always bold - it should change to 2 or 3 etc! </p>
  
  <p>Why doesn't it?</p>
  
  <p>When I change the <code>$config['base_url']</code> to <code>base_url().'controlpanel/page'</code> then does the pagination work correctly by boldening the correct number - but the link 1 points to the URL <code>controlpanel/page</code> which is the wrong page for me as the base is just <code>controlpanel</code>.</p>
  
  <p>Thanks all for any help.</p>