I can't show any css or images - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: I can't show any css or images (/showthread.php?tid=40531) |
I can't show any css or images - El Forum - 04-11-2011 [eluser]gunnarflax[/eluser] Hi, I've started working with CodeIgniter today and I'm having some trouble with applying css rules and getting images to show. I've searched the internet and the forums but haven't found an answer to my question. I use this Code: link_tag('style/style.css', 'stylesheet', 'text/css') The style folder is located in root, at the same directory level as the applications and system folder. Please help me out here? I can't show any css or images - El Forum - 04-11-2011 [eluser]bubbafoley[/eluser] can you access the stylesheet directly? ie: http://example.com/style/style.css I can't show any css or images - El Forum - 04-11-2011 [eluser]gunnarflax[/eluser] Nope, I just get redirected to the index page :/ I can't show any css or images - El Forum - 04-11-2011 [eluser]bubbafoley[/eluser] are you using an htaccess file to remove index.php from the url? sounds like that might be the problem. I can't show any css or images - El Forum - 04-11-2011 [eluser]gunnarflax[/eluser] yep, that was it. Does this mean that I cannot remove the index.php from the url without being unable to link files and images? I can't show any css or images - El Forum - 04-11-2011 [eluser]d1a8lo24[/eluser] Try the following .httaccess and see if it works. Code: <IfModule mod_rewrite.c> I can't show any css or images - El Forum - 04-11-2011 [eluser]gunnarflax[/eluser] That worked when I tried it out now Hopefully I won't experience any problems with it. I'll get back if it doesn't work as it should (which I cannot figure out why it wouldn't). Thanks for the help! |