title: php move user to 404 page after typing invalid url
body: <p>I'm designing a website but I know if the user enters a wrong character into my url, a not found page will open for him . and I know it can be a way to hack my website. What should I do for that? for example if the user enters a ' into my url like this:</p>
  
  <pre><code>http://example.com/article.php?id=585'
  </code></pre>
  
  <p>He move to a not found page which I have designed it or move to the first page or the last page he was in. 
  Thanks.</p>