Custom 404 page
Submitted by teezone on Sun, 2010-08-15 21:31.Price Tapestry
Hi David, hope all is well!
I've made some changes to the $banner["h2"] text in products.php, but is there away to redirect this to a custom 404 page?
Thanks
T.
Support forum loginActive forum topics©2006-2012 IAAI Software |
Custom 404 pageSubmitted by teezone on Sun, 2010-08-15 21:31.Price Tapestry
Hi David, hope all is well! I've made some changes to the $banner["h2"] text in products.php, but is there away to redirect this to a custom 404 page? Thanks |
Hi,
I'm assuming that you have modified this code in products.php
header("HTTP/1.0 404 Not Found");$banner["h2"] .= "(".translate("product not found").")";
However, for correct 404 protocol, I would recommend including your custom 404 page after the 404 Not Found header has been sent; for example:
header("HTTP/1.0 404 Not Found");require("404.php");
exit();
Create your 404.php page (in your Price Tapestry installation folder), and if required you can make it include your standard header and footer, e.g.
404.php
<?php$header["title"] = "Not Found";
require("html/header.php");
?>
<!-- your custom 404 HTML body here -->
<?php
require("html/footer.php");
?>
Cheers,
David.
--
PriceTapestry.com