Is it possible render `page not found` with 404 http code without redirect?

343 views Asked by At

I'm using vue-storefront. I need render 404 page without redirect and with 404 http code. They are using vue-router + vue-server-renderer I'm trying to catch 404 error, then rendering my component PageNotFound, setting status 404 to response and returning html. After that my html replaced empty component (for example Category) Or works correct but url (in browser) changing to */page-not-found. Any ideas ? Thanks.

0

There are 0 answers