title: CodeIgniter pagination url page number
body: <p>From what I saw, CodeIgniter's pagination is counting the page wrong way, because I got pagination looking like this: </p>
  
  <blockquote>
    <p><strong>1</strong> 2 3 ></p>
  </blockquote>
  
  <p>And its good, the problem is in the each pagination number url, except the first one:</p>
  
  <p>Number <strong>2</strong> from the pagination has the following url:</p>
  
  <blockquote>
    <p><a href="http://my-url.com/index.php/page/" rel="nofollow">http://my-url.com/index.php/page/</a><strong>1</strong></p>
  </blockquote>
  
  <p>And number <strong>3</strong> has the following url:</p>
  
  <blockquote>
    <p><a href="http://my-url.com/index.php/page/" rel="nofollow">http://my-url.com/index.php/page/</a><strong>2</strong></p>
  </blockquote>
  
  <p>So, the number is URL is decreased by 1 everytime.</p>
  
  <p>How can I solve that, so the page numbers in urls will be the same as the page numbers in the pagination?</p>
  
  <p>My pagination config:</p>
  
  <pre><code>$config['per_page']    = 5;
  $config['base_url']    = site_url('page');
  $config['uri_segment'] = 2;
  $page = $this-&gt;uri-&gt;segment(2);
  $total_rows_array = $this-&gt;records-&gt;get($config['per_page'], $page * $config['per_page']); // parameters: limit, offset.
  $config['total_rows']  = count($total_rows_array);
  </code></pre>