Custom 404 Page
2 posts by 2 authors in: Forums > CMS Builder
Last Post: December 15, 2011 (RSS)
Hi there, I need to setup a custom 404 page
I see that I can change this:
to something like this:
But I still want to pass a 404 header - How would I do this?
Many Thanks
I see that I can change this:
if (!$pagesRecord) { dieWith404("Record not found!"); }
to something like this:
if (!$your_tableRecord) { header("Location: http://www.mysite.com/"); exit; }
But I still want to pass a 404 header - How would I do this?
Many Thanks
Re: [theclicklab] Custom 404 Page
By Jason - December 15, 2011
Hi Jan,
You can do the redirect to a custom 404 PHP page, then at the top of that page, send the 404 header like this:
Hope this helps
You can do the redirect to a custom 404 PHP page, then at the top of that page, send the 404 header like this:
<?php
header("HTTP/1.0 404 Not Found");
?>
Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/