redirect on 404 error not working

Posted on 2009-12-17
Medium Priority
Last Modified: 2013-11-08
We added a page named 404.asp and turned on custom error pages in Plesk.
This page contains the following:

<%@ Language=VBScript %>
' Permanent redirection
Response.Status="301 Moved Permanently"
Response.AddHeader "Location", "http://www.domain.com/"

If someone trys to go to a none existent page we want them forwarded to our main page.
They get the following...

Not Found
The requested document was not found on this server.

Question by:TrueBlue
LVL 31

Accepted Solution

Henrik Johansson earned 2000 total points
ID: 26075831
Ensure the path for the 404.asp page entered in URL of the custom errors configuration is reachable through web server.

Author Comment

ID: 26077051
In Plesk you can only click to have custom error pages or not too. It does not ask you were they are located. I have it in the httpdocs directory.

Featured Post

Free recovery tool for Microsoft Active Directory

Veeam Explorer for Microsoft Active Directory provides fast and reliable object-level recovery for Active Directory from a single-pass, agentless backup or storage snapshot — without the need to restore an entire virtual machine or use third-party tools.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Learn about cloud computing and its benefits for small business owners.
This article will show you step-by-step instructions to build your own NTP CentOS server.  The network diagram shows the best practice to setup the NTP server farm for redundancy.  This article also serves as your NTP server documentation.
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question