title: .htaccess doesn't work on custom folders in codeigniter
body: <p>I have my site running in Codeigniter. I have my own folder names custom where I have placed a simple .htaccess which has </p>
  
  <pre><code>Deny from all
  </code></pre>
  
  <p>But when i hit www.example.com/custom, it shows all files in browser. However, If I hit www.example.com/system, it says "Directory access is forbidden."</p>
  
  <p>My folder structure is as follows.</p>
  
  <pre><code>mysite
  mysite/system
  mysite/custom
  mysite/application
  </code></pre>
  
  <p>....</p>
  
  <p>I have different .htaccess in root file and the redirection works fine. </p>
  
  <pre><code>RewriteEngine on
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule .* index.php/$0 [PT,L]  
  
  &lt;IfModule mod_deflate.c&gt;
    # Compress HTML, CSS, JavaScript, Text, XML and fonts
    AddOutputFilterByType DEFLATE application/javascript
    AddOutputFilterByType DEFLATE application/rss+xml
    AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
    AddOutputFilterByType DEFLATE application/x-font
    AddOutputFilterByType DEFLATE application/x-font-opentype
    AddOutputFilterByType DEFLATE application/x-font-otf
    AddOutputFilterByType DEFLATE application/x-font-truetype
    AddOutputFilterByType DEFLATE application/x-font-ttf
    AddOutputFilterByType DEFLATE application/x-javascript
    AddOutputFilterByType DEFLATE application/xhtml+xml
    AddOutputFilterByType DEFLATE application/xml
    AddOutputFilterByType DEFLATE font/opentype
    AddOutputFilterByType DEFLATE font/otf
    AddOutputFilterByType DEFLATE font/ttf
    AddOutputFilterByType DEFLATE font/woff
    AddOutputFilterByType DEFLATE image/svg+xml
    AddOutputFilterByType DEFLATE image/x-icon
    AddOutputFilterByType DEFLATE text/css
    AddOutputFilterByType DEFLATE text/html
    AddOutputFilterByType DEFLATE text/javascript
    AddOutputFilterByType DEFLATE text/plain
    AddOutputFilterByType DEFLATE text/xml
  
    # Remove browser bugs (only needed for really old browsers)
    BrowserMatch ^Mozilla/4 gzip-only-text/html
    BrowserMatch ^Mozilla/4\.0[678] no-gzip
    BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
    Header append Vary User-Agent
    ExpiresActive On
    ExpiresDefault A0
    &lt;FilesMatch "\.(ico|ICO|pdf|PDF|flv|FLV|jpg|JPG|jpeg|JPEG|png|PNG|gif|GIF|js|JS|css|CSS|swf|SWF)(\.gz)?$"&gt;
    ExpiresDefault "access plus 10 years"
    Header append Cache-Control â€œpublicâ€
    Header unset ETag
    FileETag None
    Header set Expires "Thu, 15 Apr 2025 20:00:00 GMT"
    &lt;/FilesMatch&gt;
    &lt;FilesMatch â€œ\.(xml|txt|html)$â€&gt;
    ExpiresDefault A7200
    Header append Cache-Control â€œproxy-revalidateâ€
    &lt;/FilesMatch&gt;
    &lt;FilesMatch â€œ\.(js|css)$â€&gt;
    ExpiresDefault A259200
    Header append Cache-Control â€œproxy-revalidateâ€
    &lt;/FilesMatch&gt;
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>I have the </p>
  
  <pre><code>Deny from all
  </code></pre>
  
  <p>in rest of the sub folders. System and application folders comes with CI. htaccess works fine in this folder. But in my own created folder "custom", htaccess file is not working.</p>
  
  <p>What might be the problem? Why it allows htaccess work in the default folders and why it is not working in the user created folders</p>
  
  <p>Note: I have same setting working in my nginx server. I have a different site Im uploading now. It is not working on the apache folder.</p>