I am just starting out with Codeigniter. I have referenced the css file in the corresponding views file but it fails to link. This is the code I have used to reference the css file.
<link rel="stylesheet" href="<?php echo base_url();?>css/style.css" type="text/css" media="screen"/>
I tested the css code by inserting it between & and it works. Just can't get the linking to work.
I'm sorry, rewriting the whole answer as I remember what I had to do and which should fix your problem.
Check your .htaccess file in the top level directory, I added exceptions for js/css/images
dirs otherwise they would have been rewritten:
RewriteEngine on
RewriteCond $1 !^(index\.php|css|images|js|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With