title: Htaccess- Redirect without URL change for error 404
body: <p>I have an error404.php page for all non-existing pages. Like If a page doesn't exist the page is redirected to error404.php using .htacces and its working for me. For example my URL is <em>www.mysite.com/Products</em> and by mistake user type <em>www.mysite.com/Product</em> then browser redirect user to <em>www.mysite.com/error404</em> and shows the same URL <em>www.mysite.com/error404</em> in URL box.</p>
  
  <p>It becomes very annoying for user to type the same URL again to correct error. Now i want to redirect user to <em>www.mysite.com/error404</em> but in URL box i want to keep URL same the user typed i.e. <em>www.mysite.com/Product</em> or any other wrong.</p>
  
  <p>My <strong>.HTACCESS</strong> for redirecting for error 404</p>
  
  <pre><code>Options +FollowSymLinks    
  Options -Multiviews    
  RewriteEngine on 
  
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME}.php -f
  RewriteRule ^(.+)$ $1.php [L,QSA]
  
  ErrorDocument 404 www.mysite.com/error404
  </code></pre>
  
  <p>I have also tried after searching for a long in Google...</p>
  
  <pre><code>ErrorDocument 404 error404
  </code></pre>
  
  <p>It doesn't change URL in URL box but it doesn't load error404 page content instead it just show error404 as text in whole browser window.</p>
  
  <p>Thanks in Advance...</p>