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(谢谢支持,努力冲星) 及楼上的兄弟 关于php的疑问 PHPEXCEL乱码 关于phpexcel的问题 window下php如何读取韩文文件 关于ISAPI_REWRITE一个规则问题(除了图片,js,css等除外其它都重定向到index.php) 寻求合作开发 在LINUX下用php连接mysql怎么连接不起呢, 200分请教strace发现的一个问题 可以通过odbc调用mssql带参数的存储过程吗? 急!!!!!!!PHP编译后没有生成libphp4.so不能与Oracle数据库连接. 如何引用数据库中的图片路径? 【请赐教】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 重起了