CodeIgniter Forums
CSS Not Laoding - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: CSS Not Laoding (/showthread.php?tid=43550)



CSS Not Laoding - El Forum - 07-15-2011

[eluser]Richievc[/eluser]
Wiered Problem

Have two serves one is a Staging serving and the other is live when I move over the application over to the live sever the CSS Files do not load all tho the URL in the Soruce is corect, also check the follow: config file is correct, File are present URL is correct but styles will not load any thing I mightbe missing on why this is happening.

Code:
$this->template->add_css(base_url().'css/styles.css', 'link');
Quote:<link type="text/css" rel="stylesheet" href="http://www.mysite.com/css/styles.css" />

Works fine in staging server tho odd.


CSS Not Laoding - El Forum - 07-15-2011

[eluser]Richievc[/eluser]
Ok It was the htaccess file for some reason does not work on the domain so so had to rewrite it for that domain


CSS Not Laoding - El Forum - 07-15-2011

[eluser]BrokenLegGuy[/eluser]
*edit* forget below then. Glad you figured it out.



[quote author="Richievc" date="1310759485"]Wiered Problem

Have two serves one is a Staging serving and the other is live when I move over the application over to the live sever the CSS Files do not load all tho the URL in the Soruce is corect, also check the follow: config file is correct, File are present URL is correct but styles will not load any thing I mightbe missing on why this is happening.

Code:
$this->template->add_css(base_url().'css/styles.css', 'link');
Quote:<link type="text/css" rel="stylesheet" href="http://www.mysite.com/css/styles.css" />

Works fine in staging server tho odd.[/quote]

I had this exact same problem and the solution, for me, was that I had used a wildcard in my config file
Code:
$config['base_url']="http://".$_SERVER['HTTP_HOST'];
and I tried
Code:
$config['base_url']="http://".$_SERVER['SERVER_NAME'];

It worked in testing/staging but not in production. All my paths looked correct and everything but I still had to hard code the url in for production and then it worked.

What template system are you using?

- Ed