Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6716033
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:41:05+00:00 2026-05-26T08:41:05+00:00

We have a CI installation that has the following setting in our config… $config[‘enable_query_strings’]

  • 0

We have a CI installation that has the following setting in our config…

$config['enable_query_strings'] = TRUE;

We need this in order for another area of our application to run correctly with a third party API. What’s happening, however, is that pagination is defaulting to a query string method of doing pagination, which doesn’t play well with caching.

Right now, they look like this…

http://localhost/something/?&page=6

It’s not playing well with caching, mainly because every page URL is the same page to CI. My goal is to get switched over to the below example without messing with global settings for the rest of my application.

I’ve been trying for hours to find a way to disable the above setting only within this single part of the application, so that we can properly have separate URLs for the pagination, like this…

http://localhost/something/1
http://localhost/something/2
http://localhost/something/3

So far, I have been unable to overide that setting for this controller, and honestly, I’m not sure there’s even a way to actually do it. Any help is appreciated. There’s got to be some method of disabling a feature for a single controller somehow.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T08:41:05+00:00Added an answer on May 26, 2026 at 8:41 am

    Could you use routing?

    $route['something/page/(:num)'] = "something?&page=$1";
    

    edit: to turn off pagination query strings with $config['enable_query_strings'] = TRUE;

    system/libraries/Pagination.php

    ~line 134

    change

        if ($CI->config->item('enable_query_strings') === TRUE OR $this->page_query_string === TRUE)
        {
            if ($CI->input->get($this->query_string_segment) != 0)
            {
                $this->cur_page = $CI->input->get($this->query_string_segment);
    
                // Prep the current page - no funny business!
                $this->cur_page = (int) $this->cur_page;
            }
        }
        else
        {
            if ($CI->uri->segment($this->uri_segment) != 0)
            {
                $this->cur_page = $CI->uri->segment($this->uri_segment);
    
                // Prep the current page - no funny business!
                $this->cur_page = (int) $this->cur_page;
            }
        }
    

    to

            if ($CI->uri->segment($this->uri_segment) != 0)
            {
                $this->cur_page = $CI->uri->segment($this->uri_segment);
    
                // Prep the current page - no funny business!
                $this->cur_page = (int) $this->cur_page;
            }
    

    ~line 196

        if ($CI->config->item('enable_query_strings') === TRUE OR $this->page_query_string === TRUE)
        {
            $this->base_url = rtrim($this->base_url).'&'.$this->query_string_segment.'=';
        }
        else
        {
            $this->base_url = rtrim($this->base_url, '/') .'/';
        }
    

    to

            $this->base_url = rtrim($this->base_url, '/') .'/';
    

    that might do it. Or maybe better form would be to hook into the page…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Windows XP machine that has Apache installed via a VisualSVNServer installation.
Note, this is some ancient NHibernate installation! I have the following NHibernate class: [Serializable]
I have an TFS server installation that through time has gone through upgrades from
I have a WSS installation that's behind basic authentication/SSL (it's hosted at a public
We have a PeopleSoft installation and I am building a separate web application that
I have a single installation of java in a system that runs 2 or
We have software that runs fine under a normal Windows installation but when we
I have a codeigniter code that is working on local Apache installation. But it
I have a Deplhi based Windows Service that, on installation, parses some command line
How can I validate that my ASPNET AJAX installation is correct. I have Visual

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.