You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With Code Igniter if you are using the [url=http://codeigniter.com/user_guide/general/urls.html]apache mod_rewrite rule[/url] to remove the index.php file from your urls you need to change the rule to allow any linked css files to be loaded. By default the rule will re-direct any url that does not include the text "index.php", "images", or "robots.txt" to your default controller.
This is the default rule:
[code]
RewriteEngine on
RewriteCond $1 !^(index.php|images|robots.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
[/code]
This is the modified rule to allow loading css files:
[code]
RewriteEngine on
RewriteCond $1 !^(index.php|images|robots.txt|css)
RewriteRule ^(.*)$ /index.php/$1 [L]
[/code]
Further Reading
[url=http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html]Apache Mod_Rewrite[/url]
[url=http://www.regular-expressions.info/]Regular Expressions[/url]