This isn't my exact PHP as it's rather complicated, but it's the same general idea.
if($_GET['page'] == ".htaccess"){
header("HTTP/1.0 404 Not Found");
}
When this happens, Apache doesn't load the 404 page set in the .htaccess file. I know the 404 works because when I go to a non-existent page, I get the specified 404 page.
Is there any way I can get the specified 404 page to load without manually dumping the contents of the 404 page file?