Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
446 views
in Technique[技术] by (71.8m points)

前后端分离,404/500页面如何渲染?

我想到几种思路:
第一种是前端渲染,通过router进行跳转,但是无法感知api的情况。
第二种是nginx配置。
第三种是后端渲染。

第二第三种的问题是如何识别前端路由呢?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

如果是spa,在router写入404、505页面

否则,在nginx配置中配置404、500页面的url,通过nginx进行转向。


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...