I have landing page when user hit the base URL


user will redirect to the landing page and there is link as


  • once user click on enter there website its redirect to the main website .
  • I need to set cookies for particular time when user revisit the base URL landing page after particular time period so user can direct to the redirect to the main website not landing page.

how can achieve this ? Thanks advance!

1 Answer 1


You can use magento event for this task

in your case you can use controller_action_predispatch event

If you dont know how to write event then you can take refrence to this article


and then you can check your cookie in this event and redirect user to some other page you can take refrence of this article how you can redirect to user


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.