title: Routes pagination on index method
body: <p>I have this url that is very long</p>
  
  <pre><code>website.local/movies/movies/12?filter=views
  </code></pre>
  
  <p>(Pagination + get parameters )</p>
  
  <p>how i can obtain this url ( remove "movies" )</p>
  
  <p><a href="http://localhost/downloadz/movies/12?filter=views" rel="nofollow">http://localhost/downloadz/movies/12?filter=views</a></p>
  
  <p>My Controller </p>
  
  <pre><code>public function movies(){
      $data = array();
      // Système de filtrage
      //$config['page_query_string'] = TRUE;
      //$config['query_string_segment'] = 'page'; 
      //$config['first_url'] = $config['base_url'].'?'.http_build_query($_GET);
      $get_vars = $this-&gt;input-&gt;get();
  
      if(is_array($get_vars)){
          $config[‘suffix’] = '?'.http_build_query($get_vars,'', '&amp;');
      }
  
      echo $this-&gt;input-&gt;get('filter');
      $config['base_url'] = base_url('films/movies').
      $config['total_rows'] = $this-&gt;db-&gt;where('type','movie')-&gt;get('sheets')-&gt;num_rows();
      $config['per_page'] =  12;
      $config['num_links'] = 8;
      $config['full_tag_open'] = '&lt;div class="pagination"&gt;&lt;ul&gt;';
      $config['full_tag_close'] = '&lt;/ul&gt;&lt;/div&gt;&lt;!--pagination--&gt;';
      $config['first_link'] = '&amp;laquo; First';
      $config['first_tag_open'] = '&lt;li class="prev page"&gt;';
      $config['first_tag_close'] = '&lt;/li&gt;';
      $config['last_link'] = 'Last &amp;raquo;';
      $config['last_tag_open'] = '&lt;li class="next page"&gt;';
      $config['last_tag_close'] = '&lt;/li&gt;';
      $config['next_link'] = 'Suivant &amp;rarr;';
      $config['next_tag_open'] = '&lt;li class="next page"&gt;';
      $config['next_tag_close'] = '&lt;/li&gt;';
      $config['prev_link'] = '&amp;larr; Précédent';
      $config['prev_tag_open'] = '&lt;li class="prev page"&gt;';
      $config['prev_tag_close'] = '&lt;/li&gt;';
      $config['cur_tag_open'] = '&lt;li class="active"&gt;&lt;a href=""&gt;';
      $config['cur_tag_close'] = '&lt;/a&gt;&lt;/li&gt;';
      $config['num_tag_open'] = '&lt;li class="page"&gt;';
      $config['num_tag_close'] = '&lt;/li&gt;';
      $this-&gt;pagination-&gt;initialize($config);
      //$this-&gt;input-&gt;get('filter', TRUE)
      $data['items'] = $this-&gt;db-&gt;where('type','movie')-&gt;order_by($this-&gt;input-&gt;get('filter',TRUE), "DESC")-&gt;get('sheets',$config['per_page'],$this-&gt;uri-&gt;segment(3))-&gt;result();
      $this-&gt;load-&gt;view('public/general/movies',$data);
  }
  </code></pre>