【发布时间】:2011-09-17 11:34:18
【问题描述】:
我注意到,当错误的地址在根级别 www.mywebsite.com/nopage.html 上请求某些内容时,我的 404 页面可以正常工作。但是,如果我要去一个不存在的子页面,那么我的 404 将无法正确显示 www.mywebsite.com/admin/nopage.html 。这样做的唯一方法是设置 404 中所有样式表、链接和图像的绝对路径吗?
这是我的 http.conf 条目:
ServerName www.mywebsite.com
DocumentRoot /var/www/currentsite
ErrorDocument 404 /404error.php
<Directory /var/www/currentsite>
Options -Indexes FollowSymLinks +Includes
AllowOverride all
Allow from all
Order allow,deny
</Directory>
有没有办法将浏览器发送到 404 页面,将 404 向下调用到用户最终到达的位置?
【问题讨论】:
标签: html http http-status-code-404