title: php htacess pretty urls add .html at end
body: <p>I'm using the below .htaccess file in my application.
  It's working fine so far. It's giving SEO friendly URL.
  But I need to add .html extension at the end.</p>
  
  <pre><code>Options +FollowSymLinks
  RewriteEngine On
  RewriteBase /Anupama/
  
  RewriteCond %{THE_REQUEST} /product-details(?:\.php)?\?product_id=([^\s&amp;]+)\sHTTP [NC]
  RewriteRule ^ Product/%1? [R=302,L,NE]
  
  RewriteCond %{THE_REQUEST} /products(?:\.php)?\?pid=([^\s&amp;]+)\sHTTP [NC]
  RewriteRule ^ Categories/%1? [R=302,L,NE]
  
  # skip all files and directories from rewrite rules below
  RewriteCond %{REQUEST_FILENAME} -d [OR]
  RewriteCond %{REQUEST_FILENAME} -f
  RewriteRule ^ - [L]
  
  # PHP hiding rule
  RewriteCond %{REQUEST_FILENAME}.php -f
  RewriteRule ^(.*)$ $1.php [L]
  
  RewriteRule ^Product/([A-Z,0-9-]+)$ product-details.php?product_id=$1 [NC,L,QSA]
  RewriteRule ^Categories/([A-Z,0-9-]+)$ products.php?pid=$1 [NC,L,QSA]
  </code></pre>