Magento Modify 404 Page
Magento has a default 404 page. If you want to customize a 404 page, how should you do it?
Method 1
First, let’s take a look at the default 404 page:
1. Magento’s CMS part, you can change the error page by defining it, log in to the backend admin->CMS->Pages:
2. Open the 404 Not Found page and click Content on the left to see the details of the 404 page:
3. Now redefine the 404 page, for example, enter the following code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
|
4. Click save page, reopen it, you can see that the 404 page has changed.
Method 2
Method 1 is to modify the configuration in the background. In addition, you also need to know that modifying the 404 page can also be changed by modifying the template.
1. First, change the status of 404 Not Found in CMS to disable.
2. Find the no-route.phtml page, the path is app/design/frontend/base/default/
template/cms/default/no-route.phtml, open it, you will see the following code:
1 |
|
3. Open the front page again and check whether it is consistent with the above code content. The front page is:
4. From this, you can modify the 404 page by modifying the template file.
The above introduces how to customize the 404 page in Magento? , including relevant content, I hope it will be helpful to friends who are interested in PHP tutorials.