title: codeigniter - Loading images, css, js, video, (web resources) into your html
body: <p>I am working in my first CodeIgniter project...</p>
  
  <p>After building most of my PHP and start playing with the almost finished scrip I realized that all access to <code>application/views/</code> folder is denied by the <code>.htaccess</code>.</p>
  
  <p>This is a huge problem for my file structure when I want to access page-specific JavaScript, Images or any web-resource folder. Since all my <code>views template</code> assumes that the file is used locally (That being <code>Page_name/images/cutedog.jpg</code>, in my code more precisely <code>&lt;img src="{images}cutedog.jpg"&gt;</code>).</p>
  
  <p>The solution that I found is modifying the .htacces so that it filters out all media files and it allows access to my application folder. But then by doing that I would reveal my file structure which I would rather avoid.</p>
  
  <p>I know what I could just place my web resources outside my application folder and that would solve the problem. But for maintainability purposes I think it would be more logic to have everything as it is right now.</p>
  
  <p>So my question is at follows... What work around would you suggests so that:
   - I can maintain my web resources at  <code>application/views/issue/WEB_PAGE/Web-resource-folder</code>
  - keep my file structure hidden
  - web-resources can be accessed</p>
  
  <p>my .htaccess</p>
  
  <pre><code>Deny from all
  &lt;FilesMatch "\.(css|js|jpg|pdf|avi|mpg|robots\.txt|png|pdf|favicon\.ico)$"&gt;
      Order allow,deny
      Allow from all
  &lt;/FilesMatch&gt;
  </code></pre>
  
  <p>My file structure:</p>
  
  <pre><code>-+ /application/
   |
   |-+ /Typical CI folders/        
   |-+ /view/
     |-+ /issue/
       |-+ /1/
         |-+ /page1/
           |-+ /img/
           |-+ /js/
           |-+ /video/
         |-+ /page2/
           |-+ /img/
           |-+ /js/
           |-+ /video/
  </code></pre>