I just added a htaccess file to my codeigniter application that removes “index.php” from the url. The URL’s are working fine, but now the CSS links are not working, even though the references are absolute(i.e. “http://…”) The images as well as all other links work perfectly fine, but the CSS files won’t load. This is the HTAccess file.
RewriteEngine on
RewriteCond $1 !^(main.php|images|robots.txt)
RewriteRule ^(.*)$ main.php/$1 [L]
And yes my index file for now is main.php because i will be using two different applications on the same CI installation. Thanks for any help.
You may also wish to try the following:
This will allow you create whatever folders you want in the web root (styles, images, scripts) without having to declare them in the htaccess file.