Download magento module creater


Click here to download magento module creater

Advertisements

Redirect on specif page on 404 error


Create one front controller or take it from your current module.
I have indexcontroller from my module.add below code on it.

public function sitemapredirectAction(){
        $configValue = Mage::getStoreConfig(
                   'web/default/cms_no_route',
                   Mage::app()->getStore()
               ); 
$location = Mage::getUrl($configValue );
       header("HTTP/1.1 301 Moved Permanently"); 
header("Location:$location");exit;
         //Mage::app()->getFrontController()->getResponse()->setRedirect(Mage::getUrl($configValue ));
    }

and then set up from backend.

Configuration - System - Magento Admin 2014-11-12 11-44-40