【发布时间】:2014-10-30 18:18:22
【问题描述】:
为什么这个页面返回默认的404页面:http://example.com/this%2Fthis
但是这个返回自定义的:http://example.com/this/this
这个也返回自定义的:http://example.com/?i=this%2Fthis
这是我的 htaccess 文件:
ErrorDocument 404 http://example.com/?id=error
在我的 htaccess 中,我明确指定了所有错误应重定向到的页面。在第一种情况下,我得到的是默认错误页面,而不是我的自定义页面。
问题是,我必须在我的 htaccess 文件中添加什么才能使 url 正常工作并重定向到自定义错误页面?
【问题讨论】:
-
@anubhava:是的,上面一行是我完整的.htaccess
标签: php apache redirect http-status-code-404