直接在浏览器中能访问http://localhost/webmaster/index.html吗??

解决方案 »

  1.   

    回1楼的  http://localhost/webmaster/index.html  这个在本机上能访问
      

  2.   

    路径哪里不对了?  不能写绝对路径吗??  我的 http://localhost/webmaster/index.html 页面是在 D:\server\xampp\htdocs\webmaster\index.html   如果错了 应该怎么改?
      

  3.   

    ErrorDocument 404 /webmaster/index.html这个配置,只是在404错误的时候,返回/webmaster/index.html的内容
    但客户端浏览器上的地址是不会变也,也就是说不是重定向的
      

  4.   

    5楼 大哥 应该怎么弄?
      小弟刚接触PHP不久  帮帮忙了
      

  5.   

    我想 在一个 域名下  所有不存在的网页的URL 也就是404错误的网页 都指向一个我自己自定义的网页  比如说: www.sohu.com/123213123.html  这个页面不存在 他是404错误报错,  我想这种都指向一个自己自定义的网页
      

  6.   

    如果配置成:ErrorDocument 404 /webmaster/index.html
    当客户端访问不到内容的时间,会把这个index.html的内容返回给客户端,但客户端上的URL看上去还是那个错误的地址如果你要让客户端看到的地址,也自动转变为http://localhost/webmaster/index.html
    你可以将配置改成ErrorDocument 404 /nopage.php
    nopage.php的内容为:
    <?php
            header("Location:/webmaster/index.html");
    ?>
      

  7.   

    我按照你的做了 
    httpd.conf里面 ErrorDocument 404 /nopage.php 
    然后在建了D:\server\xampp\htdocs\nopage.php 
    然后PHP文件中
     <?php
     header("Location:/webmaster/index.html");
     ?>
    重启apache 输入 http://localhost/webmaster/sdfsdfsdf.html 还是跳不到指定的 http://localhost/webmaster/index.html 这个页面  还是报错的404错误页面  还请大哥帮下忙, 小弟菜!! 
      

  8.   

    你是不是把ErrorDocument的配置写在哪个段里面了
      

  9.   

    # Some examples:
    #ErrorDocument 500 "The server made a boo boo."
    #ErrorDocument 404 http://localhost/webmaster/index.htmlErrorDocument 404 /nopage.php #ErrorDocument 404 "/cgi-bin/missing_handler.pl"
    #ErrorDocument 402 http://www.example.com/subscription_info.html
    #我这么写的 不能写在这里?
      

  10.   

    他每次发生错误的 都是跳转到 apache/error/HTTP_NOT_FOUND.html这个文件~
     但是httpd.conf 确找不到他在哪里设置了
      

  11.   

    搞定了 直接在 apache\error 这个这个文件下设置就可以了 谢谢各位
      

  12.   

    ErrorDocument 404 /missing.html 
    DocumentRoot "/home/httpd/html"
    missing.html 所在目录:
    /home/httpd/html可以正常跳转,
      

  13.   

    ErrorDocument 不能使用 http:// 吧?
    建议同楼上所述配置,可以跳转。
    不建议使用相对路径