title: Errors with htaccess
body: <p>Today I tried to write a .htaccess file for first time in order to remove .html extension from url bar along with some other things that I wanted to do. Since I was unfamiliar with all this I read several articles before coding.</p>
  
  <p>I ended up with the following code. I also removed .html from all links. The problem is that when visiting my domain I get the following error.</p>
  
  <pre><code>//The resource you are looking for has been removed, 
  //had its name changed, or is temporarily unavailable.
  </code></pre>
  
  <p>Is my code correct?</p>
  
  <p><strong>UPDATED .htaccess</strong></p>
  
  <pre><code>//Rewrite to www
  Options +FollowSymLinks
  RewriteEngine on
  RewriteCond %{HTTP_HOST} ^example\.com [NC]
  RewriteRule (.*) http://www.example.com/$1 [R=301,L]
  
  //Remove .html UNTIL NOW THIS IS THE ONLY PART 
  //OF THE CODE THAT ACTUALLY WORKS.
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^([^\.]+)$ $1.html [NC,L]
  
  //Caching schema
  &lt;FilesMatch "\.(jpg|png)$"&gt;
  Header set Cache-Control "private, max-age=160704000"
  &lt;/FilesMatch&gt;
  
  //Prevent viewing of .htaccess file
  &lt;Files .htaccess&gt;
  order allow,deny
  deny from all
  &lt;/Files&gt;
  </code></pre>
  
  <p>In a separate .htaccess</p>
  
  <pre><code>//Prevent directory listings
  Options All -Indexes
  </code></pre>
  
  <p><strong>MAIN ERRORS</strong>
  If I click on link like:</p>
  
  <pre><code>&lt;a href="index"&gt;Home&lt;/a&gt;
  </code></pre>
  
  <p>Then I get the same error.</p>
  
  <p>Thank you all in advance. </p>