I can't show any css or images |
[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?
[eluser]bubbafoley[/eluser]
can you access the stylesheet directly? ie: http://example.com/style/style.css
[eluser]gunnarflax[/eluser]
Nope, I just get redirected to the index page :/
[eluser]bubbafoley[/eluser]
are you using an htaccess file to remove index.php from the url? sounds like that might be the problem.
[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?
[eluser]d1a8lo24[/eluser]
Try the following .httaccess and see if it works. Code: <IfModule mod_rewrite.c>
[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! |
Welcome Guest, Not a member yet? Register Sign In |