你可以这样,创建1个大于512字节的跳转文件,比如叫errpage.php,指向www.sina.com.cn
比如用header跳转ErrorDocument 404  http://你的域名/errpage.php

解决方案 »

  1.   

    <VirtualHost *:80>
        DocumentRoot /webroot/
        ServerName localhost
        ErrorDocument 404 http://lsc/404_2.html
    </VirtualHost><VirtualHost *:80>
        DocumentRoot /webroot/
        ServerName lsc
        ErrorDocument 404 http://lsc/404_1.html
    </VirtualHost>假如 http://localhost 和 http://lsc 都指向同一目录,
    如果 /webroot/aa.htm 文件不存在那么访问 http://localhost/aa.htm 将转向http://lsc/404_2.html
    那么访问 http://lsc/aa.htm       将转向http://lsc/404_1.html
      

  2.   

    现在我不管改成什么都不管用!是不是有什么没加载进来或是哪里还有配置啊!ErrorDocument 404 换成本地地址,字符,和URL都不行![Tue Sep 05 15:13:40 2006] [error] [client 127.0.0.1] File does not exist: E:/xampplite/htdocs/fdsfsdf
    [Tue Sep 05 15:13:41 2006] [error] [client 127.0.0.1] File does not exist: E:/xampplite/htdocs/fdsfsdf
    [Tue Sep 05 15:13:42 2006] [error] [client 127.0.0.1] File does not exist: E:/xampplite/htdocs/fdsfsdf这个是错误日志
      

  3.   

    按我的方法做的话,要求在 /webroot/ 目录下得有 404_1.html 和 404_2.html 两个文件,当然更改 httpd.conf 后记得从新启动 apache
      

  4.   

    我的几台服务器都设置
    ErrorDocument 404 http://www.163.com都没有问题,你确认你的apache 重起了
      

  5.   

    你要写到你定义的目录里面!你确定你写到哪里了!<Directory ""></Directory >//引号里是你的目录
      

  6.   

    呵呵!写到directory里面果然好了!谢谢caotian2000(谢谢支持,努力冲星) 及楼上的兄弟