Question

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...

  1. 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.

    1. Redirect the broken links to another page on the site

    2. Create a custom error page with a link back to the main site

    3. Reinstall the missing pages

    4. Create a custom pop-up window to redirect the user

  2. You want to add PHP capability to your company’s website. What is the first thing you would check?

    1. That all pages are saved in .php extension

    2. Check that the web server has Microsoft FrontPage extension installed

    3. Check the coding and be sure the PHP code is surrounded with <?php and ?>

    4. Make sure the web server is capable of hosting PHP pages

0 0
Add a comment Improve this question Transcribed image text
Answer #1

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

My Heading My poragraph Hi. I am fon Home Page

*******************************************************************************************************************************

without .htaccess file

Object not found! The rquested URL ao sou s survr. IIyou culered Ue URLly please check your spellig ad ty aai If you think ti

*******************************************************************************************************************************************

with .htaccess

ocalhost says co back to home page

*******************************************************************************************************************************************

Note:

You may remove the echo line in 404.html to get screen without the popup.

Add a comment
Know the answer?
Add Answer to:
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...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT