Magento – Magento 404 Page redirect to home page in Nginx

404-pagemagento-1.8nginx

We work on a Magento website and recently we have created a customer 404 page basically a new CMS page and set it as CMS no route page in configuration.

This is working fine on my local system and website replica (Running through a subdomain) but not on main website.

If we type a wrong CMS page url then it redirect to home page. If we type wrong sub category url then it redirect to parent category page e.g. /men/clothing/jeansss.html redirect to /men/clothing.html and /men/clothings.html redirect to /men.html and /mens.html redirect to home page.

Please help me on this. Is there anyone who have faced the same issue?

Best Answer

Magento has a built in function for where to send 404s to, it is likely this is configured to send them to the home page.

In the admin panel, goto System -> Configuration then select Web under General on the left, and open up the tab Default Pages

There should be a CMS No Route Page, which is likely currently set to the Home Page, Change this to your desired CMS page and you should be fine. You may need to clear the cache before you see this change take effect.