Welcome Guest, Not a member yet? Register   Sign In
CSS Problem
#1

[eluser]NateL[/eluser]
I set up my CI to use Modular Extensions - HMVC, and now I'm having a problem getting the CSS to work.

I have everything in a public_html folder:

public_html/css
public_html/index.php (CI index)
public_html/system/
public_html/application/

now, in my view, I have this code generating the link to my CSS:
Code:
<link rel="stylesheet" href="<?=base_url()?>css/blueprint/screen.css" type="text/css" media="screen, projection">

which generates: http://example.com/css/blueprint/screen.css

The URL is right, but my CSS isn't working...so I copied and pasted the URL to my CSS file into the browser (so i could see the CSS and confirm it's working) and I get a CodeIgniter 404 error.. ???
#2

[eluser]GSV Sleeper Service[/eluser]
are you using mod_rewrite? it looks like there may be something wrong with your .htaccess
#3

[eluser]NateL[/eluser]
Indeed I am..

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

[eluser]NateL[/eluser]
Thanks for mentioning that!

I fixed it by adding CSS to the mix:

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

and now the CSS works perfect Smile
#5

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

try that

added css dir to the conditions
#6

[eluser]NateL[/eluser]
Thanks w3bm

I'm still learning about the .htaccess and stuff. I understand what the conditions are doing now Smile




Theme © iAndrew 2016 - Forum software by © MyBB