Welcome Guest, Not a member yet? Register   Sign In
CSS won't load
#6

[eluser]jonez[/eluser]
[quote author="Rolly1971" date="1389027878"]it depends on how the server is configured as to weather or not you need to add the rewrite condition. I know on my server i had to add that in order to load my assets such as javascripts, css, and images that are stored outside the application/views folder. Works fine if everything is inside the views folder but for me i have a 'themes' folder at the same level as the application folder and the only way i could load the assets was to add the rewrite condition in the .htaccess file. [/quote]

This line:
Code:
RewriteCond $1 !^(index\.php|images|robots\.txt|assets)
Is saying do not rewrite anything matching those paths. So yes with that rewrite and without assets CI will attempt to route those paths to a controller and fail.

If you use a rewrite like this:
Code:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
It will rewrite anything that isn't a real file or directory. I'm pretty sure this is the rewrite that's included by default, maybe you have a previous version?


Messages In This Thread
CSS won't load - by El Forum - 12-26-2013, 06:38 AM
CSS won't load - by El Forum - 12-26-2013, 11:35 AM
CSS won't load - by El Forum - 12-26-2013, 02:34 PM
CSS won't load - by El Forum - 01-06-2014, 09:04 AM
CSS won't load - by El Forum - 01-06-2014, 10:04 AM
CSS won't load - by El Forum - 01-06-2014, 10:41 AM
CSS won't load - by El Forum - 01-06-2014, 11:05 AM
CSS won't load - by El Forum - 03-06-2014, 08:32 AM



Theme © iAndrew 2016 - Forum software by © MyBB