Page 1 of 1
Custom 404 page not working
Posted: Thu May 17, 2012 9:01 pm
by a2z
I have created a custom 404.html page and stored it in the root of my opencart installation. When I reach a wrong url, I still get the standard opencart page not found page, not my custom 404 page. Are there any settings I need to do for this to work?
I am using a custom theme, does this effect the 404 pages?
Re: Custom 404 page not working
Posted: Thu May 17, 2012 9:07 pm
by inactiveaccount9912
If you want your custom not found page to be available inside opencart too, you need to create a redirect in the not_found controller in opencart.
Re: Custom 404 page not working
Posted: Thu May 17, 2012 10:58 pm
by a2z
Hi Florinsith, I am not sure how to do it. Could you please help me out with the location of the files and what command I need to put in it?
Re: Custom 404 page not working
Posted: Thu May 17, 2012 11:13 pm
by a2z
I was able to find the information in this post.
http://forum.opencart.com/viewtopic.php?f=19&t=30774
There is one mistake in the above post. the url was ending with ". It should end with single quote like below.
$this->redirect('
http://www.yoursite.com/index.php');
Re: Custom 404 page not working
Posted: Thu May 17, 2012 11:20 pm
by inactiveaccount9912
Glad you solved it. I for one, redirected the not found to homepage like above.
Re: Custom 404 page not working
Posted: Sun May 20, 2012 2:08 pm
by a2z
Hi Florinsith, when I am redirecting to my own 404 page, I am getting a page not found when I switch the currency. Can you please let me know if something is wrong?