I know little about code and have been spending several hours of my spare time online reading about redirects and regex. However, I'm still confused and am unsure if I'm even trying to solve my problem correctly.
When nothing is entered into the search boxes on my site, the visitor is led to this (Source) URL, which is a 404-error page:
However, when a visitor does enter words or phrases, but that yield no matching results, they are led to a blank page on my site (that as far as I know, I cannot edit), as you can see below:
I'd like to redirect all search results that yield no results, and that include all possible combinations of words, numbers, and symbols that yield no results, to a new page on my website.
Whenever I try to do this using the WordPress plugin, "Redirections," I never get the code right.
I believe that I need to use a modification of the Source URL to redirect searches like "monkeys" and "pandas" to a new page (since there is nothing about these things on my website and when you search for them, the blank page comes up).
What I have tried:
I've tried codes like:
^http:\/\/justusreinhardt.com\/\?s=\/(.*?)?&id=1585\/
I've had no results. I've been attempting different, similar codes that I've found online and have added the
$1
symbol to the end of the Target URL, but have still had no luck. For example, I've altered the section in parentheses above, so that the entire code looks like this:
^http:\/\/justusreinhardt.com\/\?s=\/(.*^)?&id=1585\/
Any help or clarification would be appreciated! Thank you so much!