Programmatically 301 Redirect – How to Implement redirect How can I programmatically perform a 301 redirect in Magento? Best Answer In Mage_Core_Controller_Response_Http::setRedirect(), the second option allows you supply the redirect code (defaults to 302), so Mage::app()->getResponse() ->setRedirect($someUrl, 301) ->sendResponse(); Related SolutionsMagento – How to redirect the Home Page in Magento? (301 permanent redirect) You should set ../ as target path, see the screenshot below: Now request to www.domain.com/network-nvr201-08lp will redirect to www.domain.com. Magento – Htaccess – How to i make this redirect a 301 instead of 302 Try appending [R=301] to your RewriteRule entries. If you have existing parameters (like [L]), comma-separate them: [R=301,L]. Related Topic301 Redirect – Fix 302 Redirect Issues for All Pages
Best Answer
In
Mage_Core_Controller_Response_Http::setRedirect()
, the second option allows you supply the redirect code (defaults to302
), so