Custom error pages or 404's in Plesk

Setting Up Custom Error Documents on Plesk 11 Windows
In order to setup custom error pages in Plesk on a Windows server, please do the following:
Turning on Custom Error Pages
Before you can use custom error pages, you must first turn them on.
Login to Plesk
Click on the Websites & Domains tab.
On the list of domain name at the bottom, click on the domain name you are configuring.
Check the box for Customer error documents.
Click OK.
You will be taken back to the Websites & Domains tab and it should say "Information: The settings were successfully updated" near the top of the page.
Once you have Custom Error Pages turned on, you have two options for setting them up:  edit the existing error documents, or create new ones.
Option 1: Editing an Existing Custom Error Page
The easiest way to create your own error page is to edit the ones already there.
Click on the Website & Domains tab (if not already on that page).
Click on File Manager.
Click on the error_docs folder (the text link or the folder in front of the link).
Click on the error page you want to edit.  For example, Not_Found.html.
Use Plesk's built-in HTML editor to edit the error page.
Click OK to save your changes.
Once saved, your changes will take effect.  No additional steps necessary.
Option 2: Setting up Custom Error Pages
Instead of editing the existing error pages, you can create your own with different filenames, or even specify that it redirects to a specific URL instead.
Step 1: Creating the New Error Page
Create a new page and upload it to your domain.  It can be named anything, and can be in any supported language such as HTML, PHP, ASP and ASP.NET.
You can use the File Manager in Plesk to create a new file, and then edit it, or create it on your own computer and then FTP it to the server.
Step 2: Telling the Server to Use the New Error Page
Click on the Website & Domains tab (if not already on that page).
Click on Show Advanced Options (grey link near the middle of the page) if the advanced options are not already shown.
Click on Virtual Directories.
Click on the Error Documents tab.
Click on the Error Document you wish to change.
Set the options for that error:
Default - Use the Windows IIS Default Error Page.
File - Use a specific file.  The file must be located in the error_docs directory.
URL - Use a specific a custom error document located in a directory other than error_docs.
Location:  Input the file name or URL, depending which type you selected.  If the custom error document is located in a directory other than error_docs, the path should be relative to the virtual host root (i.e. <vhosts>\<domain>\httpdocs).
For example, /my_errors/forbidden_403_1.html
Click OK.

Cette réponse était-elle pertinente?

 Imprimer cet article

Consultez aussi

What to use for MSSQL database connection string?

Please use following connection string syntax for connecting MSSQL DB from your ASP/.NET...

Create SPF record in Plesk

Creating an SPF record can help with delivery sending issues and from other server rejecting your...

Multiple Windows hosting accounts and logging into Plesk

If you have multiple Windows hosting plans with us, when logging into Plesk, you need to login...

How do I connect via RDP on my Windows VPS?

Windows Firewall is active by default, so RDP access will first need to allowed in the firewall...

Can I run a WCF on my shared or reseller hosting plan?

Sorry, no. Running a WCF is not permitted on our shared or reseller hosting plans.We suggest one...