Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8024833
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T22:58:28+00:00 2026-06-04T22:58:28+00:00

I have been tasked with forcing all of our 404 pages to return an

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T22:58:29+00:00Added an answer on June 4, 2026 at 10:58 pm

    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:

    public function indexAction() {
        $url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB)."404/landing"; //build url
        $this->getResponse()->setRedirect($url, $code = 301); //set a redirect using Zend response object
    }
    

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been tasked with automating our build process with msbuild. We have about
I have been tasked with creating a Software Installation Approval section for our Intranet.
I have been tasked with improving the current mess that is our JavaScript strategy;
I have been tasked with updating our ancient Java applet from applet tags to
I have been tasked with researching and implementing data warehousing for our ERP system
I have been tasked to come up with a code repository to host our
I have been tasked to overwrite all the free space on a few laptops
I have been tasked with building a new workflow system to handle our service
I have been tasked with migrating our product's UI to VS2010. It is an
I have been tasked with converting some scripts referencing an Informix database to be

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.