You are the administrator of a large E-commerce site. Lately there have been a number of complaints about error pages popping up due to pages being deleted.. What would be the best way to make the site more user friendly.
Redirect the broken links to another page on the site
Create a custom error page with a link back to the main site
Reinstall the missing pages
Create a custom pop-up window to redirect the user
You want to add PHP capability to your company’s website. What is the first thing you would check?
That all pages are saved in .php extension
Check that the web server has Microsoft FrontPage extension installed
Check the coding and be sure the PHP code is surrounded with <?php and ?>
Make sure the web server is capable of hosting PHP pages
Directory structure
.htaccess
index,php
errors/404.html
*******************************************************************************************************************************
.htaccess
ErrorDocument 404 /myapp/errors/404.html
*******************************************************************************************************************************
index,php
<!DOCTYPE html>
<html>
<head>
<title>Homepage</title>
</head>
<body>
<h1>My Heading</h1>
<p>My paragraph.</p>
<?php
echo "Hi, I am from Home Page";
?>
</body>
</html>
*******************************************************************************************************************************
404.html
<!DOCTYPE html>
<html>
<head>
<title>404</title>
</head>
<body>
<h1>Oops this was not found. You seem to have entered a
broken territory.</h1>
<a href="http://localhost/myapp">Go back to home
page</a>
echo ("<script LANGUAGE='JavaScript'>
window.alert('Go back to home page');
window.location.href='http://localhost/myapp';
</script>");
</body>
</html>
*******************************************************************************************************************************
Screenshots:
*******************************************************************************************************************************
index.php
*******************************************************************************************************************************
without .htaccess file
*******************************************************************************************************************************************
with .htaccess
*******************************************************************************************************************************************
Note:
You may remove the echo line in 404.html to get screen without the popup.
You are the administrator of a large E-commerce site. Lately there have been a number of complaints about error pages popping up due to pages being deleted.. What would be the best way to make the s...