CodeIgniter Forums
Hooks don't work for default controller - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forum-5.html)
+--- Forum: General Help (https://forum.codeigniter.com/forum-24.html)
+--- Thread: Hooks don't work for default controller (/thread-471.html)



Hooks don't work for default controller - Mex - 12-08-2014

Hi there

I am using CI and am attempting to use CI hooks to help build a stats library.

The problem is that when the use goes to the root folder of the website in a browser (when the default controller is used in CI), the hook I'm using doesn't get called.
When using a controller and method in the URL, the hook does get called.

Is it supposed to be like this? Or am I doing something wrong?

The reason I need this is because I need a page hit count for the home page!


RE: Hooks don't work for default controller - Mex - 12-08-2014

Oh I see now that hooks are called for default controller.
Sorry about that.