Magento: How to set 404 error on advanced search page? - magento

I removed *catalogsearch_advanced_index* section from catalogsearch.xml. Now I get empty page catalogsearch/advanced/index/
How to set 404 error for this page then?

Remove the controller. Without the xml layout, the controller will still render an empty page. In order to get Magento to not respond to that url, you have to remove the controller. Or maybe you could use a redirect.

Related

Render the sitemap at 404 page cs-cart (4.5.x)

Is there a way to show the sitemap at 404 page in cs-cart(4.5.x)? What I did is copied the sitemap.tpl code inside the 404.tpl, but it just renders empty container without links. I think the sitemap controller should be called somehow to populate the sitemap but I have no idea how to do it. May be u can give me any hint?
So to call sitemap controller when the 404 renders I had to hook up fn_control function by using before_dispatch(http://www.cs-cart.com/api#312352) and to copy the sitemap controller code inside that hook function. That's all.

What's the best approach to have a custom 404 page with October CMS with Laravel 5

I'm working on a project based on the October CMS, with Laravel 5.0.35.
I'm trying to override the 404 page.
The current 404 page is located here:
modules\cms\views\404.php
... and is served by:
modules\cms\classes\Controller.php
As you can see, both the controller and the view are inside modules. This folder is a dependency folder and its content should not be altered. The best approach I see here is to use an override.
You can see the October CMS structure here:
https://github.com/octobercms/october
Do you have any ideas or suggestions on how to achieve this?
Thanks.
'If the theme contains a page with the URL /404 it is displayed when the system can't find a requested page.'
http://octobercms.com/docs/cms/pages#404-page
Essentially just create a page withe the URL /404 and it will use this by default. The same can be done for an error (500) page, just use /error.

Custom 404 page in Magento

I know you can create and customize 404 pages directly within the Magento backend. However, I am wanting to completely use my own 404 customized page and was wondering how to do this.
I have created a 404.html file and added it in the root of my magento installation. However, I don't see in the .htaccess file how magento currently is redirecting the 404 to the CMS 404 page. How can I have it redirect to my custom 404 html file instead without causing some sort of never ending redirect loop?
Thanks!
404 page set from backend
System>Configuration>General>Web>Default Pages > YOU CAN FIND CMS No Route Page which will be default Magento CMS PAGE 404
for custom 404 page you have to create new cms page and you have to call your CUSTOM.phtml file in your new cms page after then go to the
System>Configuration>General>Web>Default Pages >CMS No Route Page > you can see your cms page and set your page as 404 page
I know it is quite an old question, but I've found the answer in this tutorial: http://alanstorm.com/magentos_many_404_pages
It explain very well how to make really custom 404 error page.

Magento - clicking on parent category returns a 403 error

I have a problem with my Magento 1.5.0.1 installation.
Clicking on subcategories works fine and will send me to the proper URL and display products. When I click on a parent category however, I get a 403 forbidden error.
Does anyone know what the problem is?
There are a few reasons that a category link would 403.
My first guess would be that there is a directory in the web root with the same name as the category and you have URL suffixes disabled.
For example giving a top level category the URL key of 'media' while URL suffixes are disables will usually result in a 403.
Another possibility would be if you are using Apache and have mod_security enabled and the category name contains a work that mod_security doesn't like (e.g. select, insert & delete).

Codeigniter 404 status header with no reason

Hello all
I have a controller which calls a model which returns after a db query an array to my view which prints some json which i can see in my browser.The problem is that this page has a 404 status header for no reason.
Any suggestions?
A page that shouldn't exist is often sends a 404 header in CodeIgniter.
You could do one of the following
Check if you the controller/method exists
Check if you have any routing that may be pointing you to another controller/method
Check if that location can be browsed via a browser
If nothing works, it would be better if you posted some of your code, routing, etc that may help.

Resources