Welcome Guest, Not a member yet? Register   Sign In
_remap 404 [SOLVED]
#1

[eluser]mutus123[/eluser]
Hello.

I am attmepting to use _remap for the first time but something's not right.

I recognizes the controller. For example:

Code:
http://www.example.com/some-controller

Code:
function _remap($method)
{
    echo 'remap invoked';
    print_r($this->uri->segment_array());
}

it prints the message, and the array containing a single member (some-controller). So it works.

However when I tack anything on to the URL such as

Code:
http://www.example.com/some-controller/blah

As I understand it, I should be able to use the _remap function to handle any and all additional URI segments within _remap. But instead I get a 404.

what am I missing?

thank you kindly for your help.
#2

[eluser]mutus123[/eluser]
I tried adding the complete path (including the extra uri segment) to config/routes.php, to map back to the controller. Even then I still get a 404 using _remap. [?]

I'm on php 5.2 if that matters.

thanks, MM
#3

[eluser]mutus123[/eluser]
I had some hyphens in some of my controller uri segments. Even though I routed them to classes without hyphens, didn't matter - that was the problem.

Removed hyphens from the class name uri segment and it's all good.

hopefully this can help someone else.




Theme © iAndrew 2016 - Forum software by © MyBB