how to redirect http error 404 to root
Saturday, 13 November 2021 · 4 messages · last reply 16 Nov 2021
GD
Günter Dunz-Wolff13 Nov 2021 12:56 #
Hi all,
how can I handle it, that in my RESTXQ-App every request, where the response is an 404-error, will be redirected to the index-page /
Thanks in advance
Guenter
AL
Adam Law15 Nov 2021 04:09 #
For flexibility you may wish to consider using a golang proxy/edge router. Also useful for https / acme.
There is a solution using traefik here:
https://imandrea.me/blog/traefik-custom-404/
This seems to use traefik.http.routers.error-router.
Adam
CG
Hi Günter,
You can add a little redirect entry to the web.xml file; see [1] for more information.
Best,
Christian
[1] https://docs.basex.org/wiki/RESTXQ#Catch_HTTP_Errors
Quoted text · Günter Dunz-Wolff · 9 lines
On Sat, Nov 13, 2021 at 12:57 PM Günter Dunz-Wolff <guenter.dunzwolff at gmail.com> wrote: > > Hi all, > > how can I handle it, that in my RESTXQ-App every request, where the response is an 404-error, will be redirected to the index-page / > > Thanks in advance > Guenter
GD
Günter Dunz-Wolff16 Nov 2021 12:16 #
Thx for the tip.
Guenter
Quoted text · +0100 · 22 lines
Am 15. Nov. 2021, 10:32 +0100 schrieb Christian Grün <christian.gruen at gmail.com>: > Hi Günter, > > You can add a little redirect entry to the web.xml file; see [1] for > more information. > > Best, > Christian > > [1] https://docs.basex.org/wiki/RESTXQ#Catch_HTTP_Errors > > > > On Sat, Nov 13, 2021 at 12:57 PM Günter Dunz-Wolff > <guenter.dunzwolff at gmail.com> wrote: > > > > Hi all, > > > > how can I handle it, that in my RESTXQ-App every request, where the response is an 404-error, will be redirected to the index-page / > > > > Thanks in advance > > Guenter
Written for BaseX 9.6. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery