title: pagination not working properly in codeigniter 2.1.0 with url_suffix
body: <p>i am using codeigniter 2.1.0 and mysql database. in my admin panel i have a page where i want to show all users with a paginating view. but it is not working. after trying a lot of things<br/>here is my <strong>updated</strong> code<br/>
  controller:</p>
  
  <pre><code>function accounts() // controller to view all users
  {
      $this -&gt; load -&gt; library('pagination');
      $config['base_url'] = site_url('admin/home/accounts/');
      $config['total_rows'] = $this-&gt;db-&gt;get('user')-&gt;num_rows();
      $config['per_page'] = 2;
      $config['num_links'] = 2;
      $config['full_tag_open'] = '&lt;p id="pagination"&gt;';
      $config['full_tag_close'] = '&lt;/p&gt;';
      $offset = $this-&gt;uri-&gt;segment(4,0);
      $this-&gt;pagination-&gt;initialize($config);
      $this-&gt;load-&gt;model('admin_model');
      $data['user_data']=$this-&gt;admin_model-&gt;all_user($config['per_page'],$offset);
      $data['links']=$this -&gt; pagination -&gt; create_links();
      $data['main_content']='admin/accounts';
      $this-&gt;load-&gt;view('includes/admin/admin_template',$data);
  }
  </code></pre>
  
  <p>view:</p>
  
  <pre><code>&lt;?php foreach ($user_data as $data) {?&gt;
  &lt;?php echo 'Name:' . ' ' ?&gt;
  &lt;?php echo ($data['name']).'&lt;br/&gt;'; ?&gt;
  &lt;?php echo 'E-mail:' . ' ' ?&gt;
  &lt;?php echo ($data['email']).'&lt;br/&gt;'; ?&gt;
  &lt;br /&gt;
  &lt;?php } ?&gt;
  &lt;?php echo $links;?&gt;
  </code></pre>
  
  <p>model:</p>
  
  <pre><code>function all_user($per_page,$offset) //shows all uer info
  {
      $query = $this-&gt;db-&gt;get('user', $per_page, $offset);
      $row=$query-&gt;result_array();
      return $row;
  }
  </code></pre>
  
  <p><br/>and here is the route:</p>
  
  <pre><code>$route['default_controller'] = "site";
  $route['404_override'] = '';
  $route['admin']='admin/admin';
  </code></pre>
  
  <p><br/></p>
  
  <p>i have used the .htaccess mod_rewrite to remove my index.php and the $config['url_suffix']='.html' to add a suffix of .html which makes the url look like this<br/> <code>'http://localhost/project/admin/home/accounts.html'</code><br/> instead of <br/><code>'http://localhost/project/index.php/admin/home/accounts'</code><br/> but if i remove the url_suffix in my config.php<br/></p>
  
  <pre><code>*/
  
  $config['url_suffix'] = '';
  
  /*
  </code></pre>
  
  <p>the pagination works fine. but i want to use url_suffix<br/></p>
  
  <pre><code>*/
  
  $config['url_suffix'] = '.html';
  
  /*
  </code></pre>
  
  <p>but if i do so, the pagination doesn't work, and shows 404 page not found error. how do i fix this issue?</p>