Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Redirect to root [SOLVED]

Hello, I want to redirect to mysite.com/ but all I get to do when I redirect is get to mysite.com/index. How can I make it appear the way I want?

return $this->response->redirect('index');

Thanks so much.



21.3k
Accepted
answer

Try this

return $this->response->redirect('');


13.0k

It works! Thanks Nicolaos! :D

edited Oct '14

You can also do

$this->response->redirect();

But I cant figure out why

$this->response->redirect('/');

doesnt work ;(



13.0k
edited Oct '14

Yes SneakyBobito, I also thought that

$this->response->redirect('/');

would take me to the root. Thanks!