Forum Moderators: coopster
This is the code on the 404 page;
<?php
$location = 'http://' . $_SERVER['HTTP_HOST'];
header("Location: $location");
exit();
?>
which should redirect me to the homepage. But all I'm getting is this output.
<html><body></body></html>
I'm trying to get an intelligent search system in place based on the work of David Skalar. It works sweetly locally but when live all my redirects fall over, producing the output above.
I'm using Apache 1.3 and PHP 4.2.3 (CGI mode)
any help very much appreciated.
I even had a chance to try the code on my own cheap webhost and it all works as expected. I've just found out we don't have access to the Apache error logs so looks like I will have to contact are hosting company and get back in to you in a bit. The PHP error logs are all clear of errors.
I have the page displaying the search dialog but its a pain feeding writing code feeding all the search data from the 404 to our search system only to be thwarted by this silly redirect issue :(