Page 1 of 1
404 pages is there a OC one hanging around
Posted: Sat Jul 31, 2010 1:52 am
by daze50
Hi I’m not great (understatement) with this .php, so is there a general 404.php page available as I was going through the seo tools with google and it reports I’m missing one.
I do know what it is, but implementing a .php on is something I could do with a quick bit of advice on.
Cheers all

Re: 404 pages is there a OC one hanging around
Posted: Sat Jul 31, 2010 5:30 am
by Xsecrets
well if you are talking about a generic 404 if an image is not found or something then that has to do with your hosting setup not opencart. If you are talking about when you try to enter and opencart type url for a product/category that doesn't exist opencart does have a 404 page that handles that.
Re: 404 pages is there a OC one hanging around
Posted: Sat Jul 31, 2010 7:30 am
by JAY6390
You can add a .htaccess line that will do what you want
Code: Select all
ErrorDocument 404 /index.php?route=error/not_found
This will redirect to the not found page of opencart for any file not found. Be sure to have it at the top of the .htaccess file. Note that if your cart is in a folder called shop you will have to add /shop before the /index
Re: 404 pages is there a OC one hanging around
Posted: Sat Jul 31, 2010 10:45 am
by Xsecrets
Nice one I'll have to remember that.
Re: 404 pages is there a OC one hanging around
Posted: Sun Aug 01, 2010 5:05 pm
by daze50
Thants great thanks all
Re: 404 pages is there a OC one hanging around
Posted: Sun Jan 09, 2011 1:10 pm
by kingdonk
Can you copy, edit then save the not found page as a new document say 403 then add ErrorDocument 403 /index.php?route=error/403 to the .htaccess file to make custom pages for other kinds of errors?
Re: 404 pages is there a OC one hanging around
Posted: Sun Jan 09, 2011 8:07 pm
by philbydevil
You can add a .htaccess line that will do what you want
CODE: SELECT ALL
ErrorDocument 404 /index.php?route=error/not_found
This will redirect to the not found page of opencart for any file not found.
Doesn't OC already redirect to the not found page automatically (my store seems to - 1.4.9.3)?
Re: 404 pages is there a OC one hanging around
Posted: Sun Jan 09, 2011 8:20 pm
by kingdonk
It does for the not found, I'm just on about all the different kind of error codes.
Re: 404 pages is there a OC one hanging around
Posted: Fri Jan 14, 2011 1:54 am
by javiecastillo
How would one do this for multiple sites? Can I specify a different 404 page for each of the individual sites I have using multisite?
Re: 404 pages is there a OC one hanging around
Posted: Fri Jan 14, 2011 2:27 am
by i2Paq
You can by using .htaccess and your Information pages.
Re: 404 pages is there a OC one hanging around
Posted: Fri Jan 14, 2011 4:03 am
by javiecastillo
Nice. Didn't think of that

Re: 404 pages is there a OC one hanging around
Posted: Fri Jan 14, 2011 5:33 am
by kingdonk
So use a information page and set the order to 0 sothat it is not displayed in the information box all over the site?
Il give this a try.
I did try this before but had the page disabled instead hoping a direct link to it would work but the actual page is disabled and not simply invisible.
Re: 404 pages is there a OC one hanging around
Posted: Fri Jan 14, 2011 6:08 am
by i2Paq
Set it to -1 to hide it from view in the Information pages.
Use: ErrorDocument 404 /index.php?route=information/information&information_id=6 (where 6 is the id of your page).
Re: 404 pages is there a OC one hanging around
Posted: Sun Sep 01, 2013 8:42 pm
by slewman
Hi guys,
after trying this solution in the htaccess file (put it right at the top)
ErrorDocument 404 /index.php?route=information/information&information_id=6
I created an information page and named it "404 Error" and made it's sort order -1
404 errors are still call the the not_found.tpl
Can someone point me in the right direction.
Cheers
Daz
Re: 404 pages is there a OC one hanging around
Posted: Mon Sep 02, 2013 11:27 am
by slewman
Solved!
For those trolling through all the "custom 404" posts. this is the one that actually works
http://forum.opencart.com/viewtopic.php?f=20&t=54975