title: Prevent users browsing the website with the old URL after rewriting
body: <p>I am new to .htaccess, and I am trying to make friendly URLs (or pretty, SEO-friendly URLs). I did the following things on .htaccess: </p>
  <p>
   - Remove .php extensions on all the file. <br>
   - Rewrite the product details pages as follow:
      <pre><code>RewriteRule ^product-details/([a-zA-z0-9_-]+)/([0-9]+)$ product-details.php?title=$1&id=$2 [L]</code></pre>
  </p>
  <p>However, when I go to the URL bar and type the file name with the .php extension, it still works. I want it to redirect the user to the 404.php page. Also, with the product details page, I type the old URL format, it also works. </p>
  <p>Illustrations: </p>
  <p><pre><code>index => index.php (Works)<br>
  product-details/chair/1205 => product-details.php?title=chair&id=1205 (Works)</code></pre>
  How to prevent this? Should I use PHP or .htaccess? If so, what is the .htaccess solution? Thanks a lot!
  </p>