How to have custom 404 page in apisix? #12006
Replies: 1 comment
-
I found a similar open issue where the suggested solution is to implement a plugin to support a custom error page. The In APISIX, you can intercept and modify responses using plugins. Specifically, you can use the Here's an example configuration using the routes:
- upstream_id: 1
plugins:
response-rewrite:
vars: [[ "status","==",404 ]]
body: { "error" : "Custom 404 Page Not Found"} This configuration checks for a 404 status and modifies the response body accordingly. You can adjust the To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other |
Beta Was this translation helpful? Give feedback.
-
Is there a plugin which checks the upstream status and if its 404 allows me to provide an url to a custom 404 not found page in apisix?
Beta Was this translation helpful? Give feedback.
All reactions