♥JcMagpie Posted July 7, 2018 Share Posted July 7, 2018 This is often overlooked when moving or updating a website. Most Hosts will provide a default 404 error page but these are generic and not very helpful to your customer. No matter how hard you try you will always find the odd broken link or missing document. This is a basic and simple way to give your customer a better more useful page on this error. It will give your customer a contact page to let you know what’s missing or how you can help. This is based on shop being installed in root directory. and on Edge but should work for any version First open your .htaccess file in the root directory and add this line to it. “ErrorDocument 404 https://www.mywebsite.com/404contact_us.php” ****replace https://www.mywebsite.com with your own website**** Now make a copy of contact_us.php in the root directory and name it 404contact_us.php Now open 404contact_us.php and find this line. It should be around line 37 in Edge. <h1 class="h3"><?php echo HEADING_TITLE; ?></h1> Replace this with, <h1 class="h3"><?php echo "Sorry but we could not find that! Please contact us and we will try and help."; ?></h1> Now save and close the 404contact_us.php file. That’s it. Now when someone finds a broken link instead of getting a generic 404 error page like this. They are redirected to your website 404 contact _us page. Its only a little thing but it all helps. Link to comment Share on other sites More sharing options...
valquiria23 Posted July 12, 2018 Share Posted July 12, 2018 Very good solution Zahid , easy and practical. Congratulations!!! these contributions that are make OSC so great !! Community Oscommerce fan You'll find the latest osC community version here. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.