By using this link (http://www.yiiframework.com/doc-2.0/guide-runtime-routing.html#catchall-route) I tried to check some parameter for whole website, but I do not know how to get rid of it, for example after check some conditions I tried to use $this->redirect to going somewhere else but it stick in a loop that always call website entry action.
How can I solve it?
Thanks in advance.
catchAll Route (http://www.yiiframework.com/doc-2.0/guide-runtime-routing.html#catchall-route) is for displaying something like “Sorry, the site is temporarily closed. Please come back later. We’ll be back …” for every request.
It doesn’t provide you with the functionality that you need.
Start here and look for an extension point where you can inject your custom logic. EVENT_BEFORE_REQEST and EVENT_BEFORE_ACTION are both good candidates.