Hi guys, I did a little research, but I cannot be able to find the answer. So I need your help. How I could hide the 404 not found that if the server is down or if the file get deleted? Here it is the php that I am using: <?php require_once('auth.php'); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Member Index</title> <link href="loginmodule.css" rel="stylesheet" type="text/css" /> </head> <body> <h1>Welcome <?php echo $_SESSION['SESS_FIRST_NAME'];?></h1> Home | <a href="home.php">My Account</a> | <a href="logout.php">Logout</a> ?> PHP: If it impossible to hide the 404 not found error, then I have got another question: how could I hide the actual url in the address bar by using the script on above? Hope you can help! Thanks, Mark
I would use htaccess ErrorDocument 404 /index.php Code (markup): what that does is redirect to the index page if there are any 404's.
Thanks for your advice guys, I cannot find htaccess in my control panel. Do you know where I could find them?
Well it depends who your hosted with and also whether it is Apache or not (htaccess is an Apache directive) but it should be in the root of your domain. You should be able to see it if you ftp to your site. Assuming your server uses htaccess and it doesn't exist in the root area of your site then all you need do is create one. Create a file called htaccess.txt in notepad, upload it to root then rename it to .htaccess, being careful to prepend it with the dot.