title: How can I fix too many redirects caused by .htaccess?
body: <p>I recently added a Wordpress blog to a client's website. I create a subdirectory and installed Wordpress there. Everything worked fine until I added a .htaccess file to the root directory.</p>
  
  <pre><code>RewriteEngine on
  rewritecond %{http_host} ^websitename.com [nc]
  rewriterule ^(.*)$ http://www.websitename.com/$1 [r=301,nc] 
  </code></pre>
  
  <p>Now, when I click on the blog link I get the following error</p>
  
  <pre><code>The webpage at http://websitename.com/blog/ has resulted in too many redirects. 
  Clearing    your cookies for this site or allowing third-party cookies may fix the problem. If not, it is possibly a server configuration issue and not a problem with 
  your computer.
  </code></pre>
  
  <p>Does anybody know how to fix this problem? I'm not at all familiar with .htaccess. </p>
  
  <p>Edit: Just to be clear, The 301 redirect works fine for all of the pages, Except for the blog folder. If you type in websitename.com, your redirected to www.websitename.com. However if you type in websitename.com/blog you will encounter the error. The blog in in this example points to a Wordpress folder.</p>