title: htaccess remove .php and .html from url
body: <p>I have a problem whereby google has indexed some pages with the wrong URL.</p>
  
  <p>The URL they are indexing is:</p>
  
  <pre><code>http://www.example.com/user/emp.php
  </code></pre>
  
  <p>and HTML URL:</p>
  
  <pre><code> http://www.example.com/login.html
  </code></pre>
  
  <p>I need it to redirect to:</p>
  
  <pre><code>http://www.example.com/user/emp
  </code></pre>
  
  <p>and HTML URL:</p>
  
  <pre><code>http://www.example.com/login
  </code></pre>
  
  <p>here is my .htaccess file</p>
  
  <pre><code>RewriteEngine On
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^([^\.]+)$ $1.php [NC,L]
  RewriteRule ^([^\.]+)$ $1.html [NC,L]
  </code></pre>