Trace why magento url is being redirected to 404 page

As soon as you open any magento based URL then following three thigs occur

1.Read the required controller and controller is dispatched based on URL routing
2.If your module name is mage_cms writter from module’s etc/config.xml then your contller will be called from following location ‘moduleName/controllers/controller/’ if no action is defined then IndexController.php will get called.
3.Once magento ensures that controller is availabe then it calls the respective action from it otherwise it redirects url to 404 page.

You can trace the name of controller for which magento is looking for it from app/code/core/Mage/Core/Controller/Varien/Router/Standard.php
Search for the text getControllerFileName. This is where your controller gets its name, as well as the general area of the system where Magento decides if it has a legitimate request or not.

Related posts:

The following two tabs change content below.

Chandra Shekhar

GCP Architect
Chandra Shekhar Pandey is Google certified Cloud engineer, I am Magento2 Trained developer. Having huge experience in designing cloud solution. I have around 12 years of experience with world enterprise IT companies and fortune 500 clients. During my architecture design I am always caring about high availability, fast performance and resilient system. From the programmer background I have huge experience in LAMP stack as well. Throughout my carrier I have worked on Retail, E-Learning, Video... Read More about Chandra Shekhar

Latest posts by Chandra Shekhar (see all)