Apache 404自定义错误 你可以这样,创建1个大于512字节的跳转文件,比如叫errpage.php,指向www.sina.com.cn比如用header跳转ErrorDocument 404 http://你的域名/errpage.php 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <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 现在我不管改成什么都不管用!是不是有什么没加载进来或是哪里还有配置啊!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这个是错误日志 按我的方法做的话,要求在 /webroot/ 目录下得有 404_1.html 和 404_2.html 两个文件,当然更改 httpd.conf 后记得从新启动 apache 我的几台服务器都设置ErrorDocument 404 http://www.163.com都没有问题,你确认你的apache 重起了 你要写到你定义的目录里面!你确定你写到哪里了!<Directory ""></Directory >//引号里是你的目录 呵呵!写到directory里面果然好了!谢谢caotian2000(谢谢支持,努力冲星) 及楼上的兄弟 求一SQL的选择匹配!在线等! WAMP\Apache\tomcat这三者是什么关系的? php到底用来做什么? 求助 php 实现分页? 关于一查询语句 急!数组处理! 诡异。update执行不了 初学PHP 想问下下面代码表达什么? include和include_once PHP的Cookie问题 如何引用数据库中的图片路径? 【请赐教】PHP如何做群发邮件??(10万条以内)
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
[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这个是错误日志
ErrorDocument 404 http://www.163.com都没有问题,你确认你的apache 重起了