Magento – Redirect to Home Page in Controller

controllersmagento-1.9redirect-url

I want to redirect my site to home page (base URL) in Controller.

$this->_redirect();

Using above mentioned function gives me the warning to specify the argument.

Warning: Missing argument 1 for Mage_Core_Controller_Varien_Action::_redirect()

When I use the following as argument

$this->_redirect(Mage::getBaseUrl());

It just append the base url in my site url which results something like this

Which is obviously a 404 page. Please help me to figure this out.

Best Answer

I reckon you should try to the following:

$this->_redirect("/");
Related Topic