Welcome Guest, Not a member yet? Register   Sign In
unexpected 404
#1

[eluser]umbongo[/eluser]
I loaded a new M,V,C into my CI application, however, when i try to load example.com/newcontroller i get a 404. All other controllers work. Any ideas what I have missed??

Secondly, when it is 'working' if i append anything onto the end of a URL i need to go to example.com/controller/controller[/whatever]. going to example.com/controller[/whatever] gives a 404. example.com/controller works. What have i set up wrong???
#2

[eluser]Narkboy[/eluser]
To the first:

Do you have an index function in newcontroller.php? Without index or _remap calling the controller will give you 404 unless you provide a specific route.

To the second:

If: /controller/controller/function works, then have you got the controller in a sub-folder? You said it dosen't work but then 'when it is working'? Can you clarify?

Remember:

example.com/controller -> loads the index function (or _remap) in controller. 404 if these don't exist.
example.com/controller/function -> loads the 'function' function in controller (or _remap) 404 if these don't exist.

/B
#3

[eluser]umbongo[/eluser]
Thanks, you were right there was no index function..

As for the second part, 'when it is working' was referring to all of the other controllers I had which were working. And no, the controllers are all just in the controllers folder, no sub-folders there.




Theme © iAndrew 2016 - Forum software by © MyBB