springboot怎么把数据传给前端:springboot 如何引入前端 bootstrap?
这种问题网上一搜一大堆,你可以具体找一篇文章试试,遇到问题可以针对相关问题去提问。springboot通过jar包方式引入bootstrap_个人文章 - SegmentFault 思否 这不是查查就
顺晟科技
2022-10-18 14:03:26
190
我正在尝试为每个错误引发一个自定义错误
页面。这是我的目录。
.htaccess
error_pages:
error_400.html
error_401.html
error_404.html
顺晟科技:
你很接近了。首先,如果你还没有这样做,你需要初始化你的.htaccess文档。
RewriteEngine On
接下来,您需要定义错误并告诉.htaccess使用哪个文件来处理该错误:
ErrorDocument 400 /error_pages/error_400.html
ErrorDocument 401 /error_pages/error_401.html
ErrorDocument 404 /error_pages/error_404.html
希望这能有所帮助.
您将问题标记为php
,但在示例中使用了.html
?如果您使用的是PHP,那么您不需要为每个HTTP状态创建单独的错误文档。您可以使用相同的PHP错误文档并检查REDIRECT_STATUS
(即,$_SERVER['REDIRECT_STATUS']
SUPERGLOBAL)以确定触发错误文档的错误的状态。
因此,您的.htaccess
文件将包含:
ErrorDocument 400 /error_pages/error_handler.php
ErrorDocument 401 /error_pages/error_handler.php
ErrorDocument 404 /error_pages/error_handler.php
参考资料:
05
2022-12
02
2022-12
02
2022-12
29
2022-11
29
2022-11
24
2022-11