Link to home
Start Free TrialLog in
Avatar of TrueBlue
TrueBlueFlag for United States of America

asked on

redirect on 404 error not working

Hi!
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/"
Response.end
%>

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

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


ASKER CERTIFIED SOLUTION
Avatar of Henrik Johansson
Henrik Johansson
Flag of Sweden image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of TrueBlue

ASKER

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