Forum Moderators: phranque

Message Too Old, No Replies

Redirect upon 404 on Windows based server

I am having issues with this

         

djfelip

7:15 pm on May 31, 2005 (gmt 0)

10+ Year Member



Hello,
I am using a windows 2000 server, what I am trying to do is instead of getting a "404 page cannot be found" I would like it to redirect to the homepage. What I have attempted to do is change the path of the custom errors in ISS, I changed it to a page that I put in a <script> location=, unfortunately this did not seem to solve my problem. Any suggestions would be greatly appreciated.

Crispix

10:15 pm on May 31, 2005 (gmt 0)

10+ Year Member



There are a few ways to do this . . . here's two off the top of my head:

1. In IIS, change the 404 error page to type URL, and type in the full URL of your home page. Done!

2. Like you said, you should be able to change the 404 error page to type FILE, and then select an HTML page of your choosing. In the HTML page, make:

<script>
document.location.href='http://www.website.com/';
</script>

It might just be a syntax error if you think you already tried this . . just double check everything. I use custom 404 pages on several ASP/IIS sites without a problem.