views:

11

answers:

1

Hello all,

I am using XAMPP on windows machine for designing my prototype.

Here is the question. Howe can I redirect all broken links on my webpage to a prefine error page?

Thank you

+1  A: 

Open the httpd-multilang-errordoc.conf file. This is where all of the custom error pages and where they go are defined. Look for this (if you don't find it, add it)

ErrorDocument 404 /error404.html

Where the /error404.html is the name of your predefined error page. Place this file in the htdocs folder. Restart XAMPP service.

The other method involves adding this line to your virtual server configuration lines.

Additional Resources

Forum 1

Forum 2

Tommy
Hello Tommy,I have one more related question. If I move my prototype to a hosting site 1> Do I have permission to make such a change? 2> Do I change the same file?Thank you
q0987
You would use the same file, but to answer question 1, it really depends on the hosting provider. Some will let you mod parts of the config files, others may want thier own 404s in place. It would be a good question to ask before signing up.
Tommy