Change beforeDispatcherLoop to beforeExecuteRoute cause getActionName or getControllerName would not working probably with index