Hi,
I have the following on my site's page.php file:
valid_page function checks whether the requested page exists or not in the database. Is this a good way to handle 404 errors? Do you have a better suggestion?PHP Code:$page = $_GET['page'];
if (valid_page($page)) {
echo $page['page_title'];
echo $page['page_content'];
} else {
header('HTTP/1.1 404 Not Found');
header('Location: /404.php');
}



Reply With Quote



Bookmarks