title: Redirection to 404 pages with .htaccess
body: <p>I have created a folder in my localhost named "example".and I have added 4 files inside that folder.</p>
  
  <ul>
  <li>index.php </li>
  <li>about.php </li>
  <li>.htaccess</li>
  <li>404.php</li>
  </ul>
  
  <p>when I type the url <a href="http://www.localhost/example/123" rel="nofollow">http://www.localhost/example/123</a> (working fine) It is going to 404 error page.</p>
  
  <p>when I type the url <a href="http://www.localhost/example/index.php/123" rel="nofollow">http://www.localhost/example/index.php/123</a> it is not redirecting to 404 page.
  the same happening FOR about.php and other php extension files in the example folder.</p>
  
  <p>In my htaccess file I have re-directicted the non existing file ro 404 pages.But is not happening for the index.php,about.php..and all the files with php extension in the example folder.</p>
  
  <p>the following is my current .htaccess file.</p>
  
  <pre><code>RewriteEngine On
  
  RewriteBase /
  
  RewriteCond %{REQUEST_FILENAME} !-f
  
  RewriteCond %{REQUEST_FILENAME} !-d
  
  ErrorDocument 404 /404.php
  </code></pre>