404 page for error 6007

@Alex_Klein

Tell me if I understand you correctly.

  1. User follows the link example.com/John
  2. Since the link is invalid, we are redirecting to example.com/?page=404
  3. But 404 should know about John
  4. So link example.com/John should redirect us to example.com/?page=404&invalidQuery="John"
  5. For the 404 page you add logic to handle invalidQuery

Something like this?
You have three topics with similar questions
First, Second, this
Can you combine questions into one topic? Like this one.

Regards