Hi,
I have some code which takes a variable from GET and uses it to generate the name of the file to include - for example, going to index.php?area=home means that index.php then includes home.php. I've created a piece of code which takes this filename and searches the directory for it. If it doesn't exist, it executes a redirect to my custom 404 page.
The problem is that it is currently just using Header (Location: 404.php). Since my 404 sends an email to me everytime with the bad link, whenever this happens it tells me that the bad link was 404.php itself. Including the file results in a blank page. Is there some way I can generate a real 404, like you get when a page doesn't actually exist?