NUXT dedicated search page without 404's

Hi!

I’m having problems with a dedicated search page built with NUXT. All works flawlessly locally but in production I get 404’s if the search page is loaded directly. The page, with the results, is actually loaded but not without the 404 error.

I have been trying to set up a structure that works but after many attempts I’m not getting any further.
Here’s my latest attempt:

  • pages
    • search
      index.vue
      • _query
        index.vue

https://pensive-aryabhata-525130.netlify.app/search/choker

Warning, depending on your location are some images slightly NSFW

Any hints are highly appreciated!

After bit of rational thinking I realized that dynamic routes is not the way to build a dedicated search page, use search?term=jawohl instead. Works like a charm!

thank you for posting your solution, @henrikhansson !