Can't access /css/style.css |
[eluser]a_bains[/eluser]
Hello, My directory structure is as follows: / .htaccess system/ ..application/ ..controllers/ ..css/ ...style.css The style.css is in /system/css/style.css When I try the url http://192.168.0.6/css/style.css it says page cannot be found. I have removed the index.php file from the url. When I try http://192.168.0.6/system/css/style.css then it works..
[eluser]danmontgomery[/eluser]
/system/css/style.css and /css/style.css are different paths...
[eluser]a_bains[/eluser]
Yes I understand, sorry, I prefer to use the first url ie. http://192.168.0.6/css/style.css without having to remember to include the system directory in all my URLs. I just hardcoded system into my CSS URL and that works - is using system in URLs (images, CSS, scripts, etc) common practice for CI developers? Code: <link rel="stylesheet" type="text/css" href="/system/css/style.css" />
[eluser]xzela[/eluser]
I found a really nice helper called Snappy Source which helps you add images, scripts, and styles to your views. More information can be found here http://codeigniter.com/wiki/Snappy_Source/ I highly recommend it.
|
Welcome Guest, Not a member yet? Register Sign In |