开发者

How to redirect all broken links to a standard error page?

开发者 https://www.devze.com 2023-01-11 02:24 出处:网络
I am using XAMPP on windows machine for designing my prot开发者_如何学Cotype. Here is the question. Howe can I redirect all broken links on my webpage to a prefine error page?

I am using XAMPP on windows machine for designing my prot开发者_如何学Cotype.

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

Thank you


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

0

精彩评论

暂无评论...
验证码 换一张
取 消