redirect is not working properly?

I have the below code on handling 2 actions (Save, Save & Add New),


 if ($btn == 'Save & Add New') {

                    return $this->redirect(['xx-xx']);

                } else {

                    return $this->redirect(['index']);

                }

When I click save, I execute the below code


return $this->redirect(['index']);

it does not redirect? but the redirection works for "xx-xx""

show more code.

maybe better is to redirect after saving.

Try this, you normally add the controller.


return $this->redirect(['site/index']);