How to redirect search query to main search page

96 0 5

Using debut - my goal is to hide all of my website's pages from internal search (this question is not about search engine results). I have used this code in  my search.liquid, and search-form.liquid to hide pages from coming up:

<input type=hidden name=type value="product,article">

 However, I would also like to ensure that pages cannot be searched by entering the page name in the url to search:


Can I use a redirect like this? It doesn't seem to be working?

Redirect from:




If not does anyone have any other solutions? Thanks!