Bootstrap glyphicons在codeigniter中表现得很奇怪

So I'm using CI for the first time, along with bootstrap. Weird thing is happening with the glyphicons on my pages.

If I start my url in the browser with "www.", it all works fine. If I don't use it (so example.com instead of www.example.com), the glyphicons do not show. In their place are empty square boxes.

Can someone explain to me why it is behaving like this?

$config['base_url'] = 'http://www.[mysitehere].ovh/';

Note: If I change the above to 'http://[mysitehere].ovh' then the reverse is true. If the www. at the beginning is present, then the glyphicons don't work and vice versa.

I dont see how is that related to icons, but better solution is to add in config.php

$config['base_url'] = 'http://'.$_SERVER['SERVER_NAME'];

Try with:

$config['base_url'] = '';

CodeIgniter is able to figure out the base URL by itself.