Search code examples
codeigniterpyrocms

PyroCMS remap gone wrong


I have this remap:

public function _remap($method, $params = array()) {
        if (method_exists($this, $method)) {
            if ($this -> uri -> segment(1)) {
                $this -> index($this -> uri -> segment(1));
            } else {
                $this -> index();
            }
        } else {
            return call_user_func_array(array($this, $method), $params);
        }
    }

On my local machine it works fine, but on my test-production it only redirects to index() no matter WHAT I input as querystring. Will someone please help me debug this?

The routes.php is equal on both servers.

If i try to change my index function to only output the requested uri like this:

function index($id = null)
{
    $this->output->set_output('id: ' . $id);
    return;

only "id : " gets output. Hence the $id is lost somewhere in transition, but I really don't know why

SOLUTION in system/cms/config/config.php I had $config['uri_protocol'] ) 'PATH_INFO', but on my production server, this didn't work, so I changed it to 'AUTO' And it worked.


Solution

  • in system/cms/config/config.php I had $config['uri_protocol'] = 'PATH_INFO', but on my production server, this didn't work, so I changed it to 'AUTO' And it worked.