title: Password protected directory by ht access is redirecting to site root
body: <p>In my server the site root directory i put a .htaccess file to re write the url. Then i created a directory in the root named 'for_clinent_only'. Everything is working fine. Then i made the 'for_clinent_only' directory password protected from server cpanel. Now if i brows this directory <a href="http://www.ilcusa.org/for_clinent_only/" rel="nofollow">http://www.ilcusa.org/for_clinent_only/</a> then it redirect me to <a href="http://www.ilcusa.org/" rel="nofollow">http://www.ilcusa.org/</a>. </p>
  
  <p>The url re-write code is </p>
  
  <pre><code>RewriteEngine On
  
  RewriteBase /
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
  RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
  </code></pre>
  
  <p>if i remove the rewrite code then i can brows www.ilcusa.org/for_clinent_only/  link again </p>
  
  <p>i searched in the web and tried put some code there but non of the </p>
  
  <pre><code>RewriteEngine On
  RewriteRule ^for_clinent_only  - [L]
  RewriteBase /
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
  RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
  </code></pre>
  
  <p>also tried </p>
  
  <p>RewriteEngine On</p>
  
  <pre><code>RewriteBase /
  RewriteCond %{REQUEST_URI} !^/for_clinent_only
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
  RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
  </code></pre>
  
  <p>And i also followed this serverfault.com/questions/410445/excluding-a-directory-from-a-root-htaccess-rewrite-rule-to-allow-it-to-be-passw links suggestions  but none of this did not worked, 
  Can anyone help me solve this problem.</p>