Cannot serve index method by default? |
How come I cannot serve the index method by default?
I have a controller 'platform' (with an index method) ... when visiting http://localhost:8081/platform I get: Code: Not Found Even if I specifically add these routes I get the same. Now, I can't for the life of me figure out what the cr... CI is doing to cause this. PHP Code: $routes->add('platform', 'Platform::index');
OK, to answer myself in the future.
I had renamed a folder inside the public folder to 'platform' to separate assets. And that kicked me! So CI obviously serve whatever /urlpath from the /public folder before checking for at controller of that name ... I guess that's a feature (and probably makes sense). But I simply wasn't aware of that ... and therefore spent a decent amount of time figuring this out. So: DON'T have a path in your public folder that matches ANY routes. Unless of course, you want to ; ) |
Welcome Guest, Not a member yet? Register Sign In |