Weird routing problem for bootstrap assets in IE8 |
[eluser]bill19[/eluser]
Hi everyone, I am trying to implement the bootstrap form at https://github.com/jackilyn/bootstrap-contact/ into my site. after integration it works fine in chrome, IE9 and firefox , but in IE8 , I am getting: Quote: Couldn't load http://localhost/my_project/index.php/my...reset.less (404 Using chrome developer tools ( it is working in chrome ) , under the network tab I see that the directory for reset.less is Quote:localhost/my_project/assets/lessnot Quote:localhost/my_project/index.php/my_controller/assets/less/ I am concerned that there is some strange routing problem involving CI and IE8. Can anyone offer me advice on how to fix this? Thanks, KC
[eluser]CroNiX[/eluser]
It sounds like you are using site_url() instead of base_url() for creating the url to your asset. site_url() automatically adds index.php if index.php has not been removed via the config and htaccess. site_url() will return your $config['base_url'] setting + $config['index'], so if $config['index'] = 'index.php', that's where it's coming from. base_url() will return the base_url by itself (http://yoursite.com/ or whatever you have it set to)
[eluser]bill19[/eluser]
Thanks for looking at it croNiX, I am using Code: <base href="<?=base_url();?>"> Code: <!doctype html> and again if this was the case why would it work in the other 3 browsers? KC
[eluser]CroNiX[/eluser]
What's your $config['base_url'] set to? It looks like it should be 'http://localhost/my_project/' What is $config['index_page'] set to?
[eluser]CroNiX[/eluser]
Also, are you using an htaccess file? If so please post it.
[eluser]bill19[/eluser]
Quote:$config['index_page'] = 'index.php'; no .htaccess file. Quote:$config['base_url'] = ''; Thanks, KC
[eluser]CroNiX[/eluser]
Try explicitly setting your base_url like I showed. Right now it's guessing (since it's empty), and it might be getting it wrong.
[eluser]bill19[/eluser]
Hi CroNiX, I followed your directions, and I have a clarification. I realized that the browser ( which is IE8 ) is set on Document mode IE7 standards. When I set Document mode IE8 standards it works normally. ( you go to tools->developer tools to do this in IE8 ). So I may need to investigate more on CI, IE7 and bootstrap, unless you are aware of any specific issues or fixes. Thanks, KC |
Welcome Guest, Not a member yet? Register Sign In |