Codeigniter: unable to link css file link

I am just starting with Codeigniter. I refer to the css file in the corresponding views file, but it is not linked. This is the code I 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, inserting it between and and it works. I just can’t make the link work.

+5
source share
2 answers

Sorry, rewriting the whole answer, as I remember what I needed to do and which should fix your problem.

Check the .htaccess file in the top-level directory, I added exceptions for js/css/imagesdirs, otherwise they would be rewritten:

RewriteEngine on
RewriteCond $1 !^(index\.php|css|images|js|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
+8
source

( )... RewriteRule .htaccess , , , WAMP, C:\wamp\www\my_site\my_new_app, RewriteRule

RewriteRule ^(.*)$ /mysite/my_new_app/index.php/$1 [L]

CI newbs

0

All Articles