Welcome Guest, Not a member yet? Register   Sign In
Load css files from directory
#1

[eluser]levani[/eluser]
I have my css and javascript files in a directory called "assets" which is on the same level as codeigniter's application or system folder. However, after I added this code to my htaccess file, in order to get rid of the index.php in url, I can no longer load these filed like this::

Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ index.php?/$1 [L]

Code:
<?php echo base_url('assets/css/style.css'); ?>

It return something like this:

Quote:http://localhost/ci/assets/css/style.css

which seems to be correct but I get 404 error on that url! Any ideas?




Theme © iAndrew 2016 - Forum software by © MyBB