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


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


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.

3 Answers 3


I reckon you should try to the following:

  • Thanks a lot. Brilliant.. you are right, digging more into "Mage_Core_Controller_Varien" and got the result. protected function _redirect($path, $arguments = array()) May 12, 2016 at 9:04
  • @MuhammadSaiid feel free to mark your question as answered so it'll benefits for others ;) May 12, 2016 at 9:05

You can try below code

$url = Mage::getBaseUrl();
  • Yes, it worked. Thanks for let me know another way to cop this out. :) May 12, 2016 at 9:16

Where "magento" is my root folder name. (For localhost/magento..)

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.