我可以通过 .htaccess 重定向什么时候
- 用户发现内部服务器错误
- 未找到的页面
那可能吗?如果是这样,有人可以帮我改写规则吗?
编辑
试
ErrorDocument 500 /oohps.php
ErrorDocument 404 /where.php
并将它们添加到 domain.com/oops.php 和 domain.com/where.php 但仍未加载
我可以通过 .htaccess 重定向什么时候
那可能吗?如果是这样,有人可以帮我改写规则吗?
编辑
试
ErrorDocument 500 /oohps.php
ErrorDocument 404 /where.php
并将它们添加到 domain.com/oops.php 和 domain.com/where.php 但仍未加载
为什么不直接使用自定义错误响应ErrorDocument
?
ErrorDocument 500 /errors/internal-server-error.html
ErrorDocument 404 /errors/not-found.html
通过修改 /etc/apache2/conf.d/localized-error-pages 文件中的“ErrorDocument”,我可以重定向到 404 错误(找不到页面)的索引页面,这很有用。
谢谢.....