Hi,
the way my site works I have the outside bit which stays the same across the site, and then the section is given in the query string, and then the content is in a file included (from a path added to the default path, using ini_set)
What I want to do is check if there is a query string, and if there is, check that the file exists, and if it doesn't give a 404.
My code atm looks like
$query = $_SERVER['QUERY_STRING'];
if ($query && (!file_exists("$query.php")))
{
header("Status: 404 Not Found");
}
but this does not work. Any ideas?
I've also tried using isset and is_null on both $query and $_SERVER['QUERY_STRING'].
Thanks
Goatee