• The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Custom Error Doc With PHP or ASP

D

daveberk

Guest
Had to figure this out for my needs, thought I would share it with the community.

I wanted to use PHP (or ASP) to process "404 page not found" errors.

I added this JavaScript code to the <head> tag/area of the not_found.html file in the error_docs folder.

<SCRIPT LANGUAGE="JavaScript">
<!--
window.location="http://www.<mysite>/error-handler.php?req="+location.href;
// -->
</script>

Then I created my error-handler.php file (in the httpdocs folder) with this code:

@$page = $_GET['req'];

This loads the URL of the error-ed page into the $page variable (ex. http://www.<mysite>/bad-page.html).

The rest is up to you. I am using it to check a database for "subscriber aliases"
(ex. http://www.<mysite>/person1) that I then use to redirect the visitor to a certain page, also stored in the database.

Obviously it won't work for people with JavaScript turned off, but I tend to go with the 99% solutions.

Hope this helps.
 
Back
Top