1

Whenever Add Secret Key to URLs feature is enabled in admin, admin grid is redirecting to dashboard.

When it is disabled it is redirecting to correct URL(same page).

Please suggest how to pass secret key to URL.

return $resultRedirect->setUrl('*/*/index');

1
  • I dont understand what is your question but if you asking for "secret_key" to pass in url then you don't need to pass secret key from url it will automatically taken by magento's default way.
    – Himanshu
    Sep 28, 2018 at 4:59

3 Answers 3

1

you can try setPath('frontname/controller/action')

0

You form must have form key to allow submit data. Like this : Click here

Then you can redirect to dashboard using this below line :

$this->_redirect($this->_backendUrl->getStartupPageUrl());
0

You can give controller and action name in redirection

return $resultRedirect->setUrl('route/contoller/index');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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