title: assets are not loading in codeIgniter
body: <p>Im new to codeIgnitor and trying to load assets folder css into my header.php.
  Before i post this question i have searched everywhere and im doing correctly what everyone saying. but still when i load the page css file not loading. </p>
  
  <p>I have <code>.htaccess</code> in following way.</p>
  
  <pre><code>RewriteEngine on
  RewriteCond $1 !^(index\.php|assets|images|js|css|uploads|favicon.png)
  RewriteCond %(REQUEST_FILENAME) !-f
  RewriteCond %(REQUEST_FILENAME) !-d
  RewriteRule ^(.*)$ ./index.php/$1 [L]
  </code></pre>
  
  <p>in <code>Config.php</code></p>
  
  <p><code>$config['base_url'] = 'http://localhost/codeigniter/demoblog';</code>
  <code>$config['index_page'] = '';</code></p>
  
  <p>in <code>autoload.php</code></p>
  
  <p><code>$autoload['helper'] = array('url', 'form','text');</code> </p>
  
  <p>in <code>Controllers-&gt;Pages.php</code></p>
  
  <pre><code>class Pages extends CI_controller{
      public function view($page = 'home'){
          if(!file_exists(APPPATH.'views/pages/'.$page.'.php')){
              show_404();
          }
          $data['title'] = ucfirst($page);
          $this-&gt;load-&gt;helper('url');
          $this-&gt;load-&gt;view('templates/header');
          $this-&gt;load-&gt;view('pages/'.$page, $data);
          $this-&gt;load-&gt;view('templates/footer');
      }
    }
  </code></pre>
  
  <p>in <code>header.php</code></p>
  
  <pre><code>&lt;head&gt;
      &lt;title&gt;My Blog&lt;/title&gt;
         &lt;link rel="stylesheet" href="&lt;?php echo base_url();?&gt;assets/css/main.css"&gt;
    &lt;/head&gt;
  </code></pre>
  
  <h3>But When i load the page everything works well without css.</h3>
  
  <p>in source i can see style url is also set correctly. <code>&lt;link rel="stylesheet" href="http://localhost/codeigniter/demoblog/assets/css/main.css"&gt;</code>
  but when i click on it its broken.</p>
  
  <p><a href="https://i.stack.imgur.com/Evntp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Evntp.png" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/Oz25L.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Oz25L.png" alt="enter image description here"></a></p>