title: .htaccess - This webpage has a redirect loop
body: <p>I'm cleaning my URLs and everything looks fine but whenever I try to access any directory such as images etc then chrome shows that "This webpage has a redirect loop." However I want to protect directories inside public_html.</p>
  
  <p>The .htaccess file is inside public_html</p>
  
  <pre><code>&lt;ifModule mod_rewrite.c&gt;
  RewriteEngine On
  RewriteBase /
  
  
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  
  RewriteRule ^(.*)$ index.php?/$1 [L]
  RewriteRule ^(.+)/$ http://%{HTTP_HOST}/$1 [R=301,L]
  &lt;/ifModule&gt;
  </code></pre>
  
  <p>I want to protect images, css and javascript directories but want to allow access to the admin directory.</p>
  
  <p>Thank in advance.</p>