• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Different 404 for API controllers


I'm developing a restful API for my application and if you try to access a method that doesn't exist on a controller (as you know) codeigniter automatically shows the default 404 page. This is fine for the rest of the app but for all controllers inheriting from MY_APIController I want to serve a json error response and give a 404 header.

Anyone know a good way of doing this?

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.