I have been tasked with forcing all of our 404 pages to return an http status of 301. I have been searching/reading around the web, but I can’t find any info on how to accomplish this.
Is there a way to change the http status in the layout.xml or template files? if not, what controller should I be looking at?
I ended up doing this with 3 steps:
First I created a new cms page (404/landing) and copied over all the cms settings from my 404 page. This is the page I am redirecting users to.
I then created a new module (you can use this great guide by Alan Storm http://www.magentocommerce.com/knowledge-base/entry/magento-for-dev-part-3-magento-controller-dispatch) and used the following action:
Once I had my module and landing page working, I simple changed the Default No-route URL (System -> Configuration -> Web -> Default Pages) to that of my new module.