Welcome Guest, Not a member yet? Register   Sign In
Images, CSS, JS disappear on any controller, but home page
#7

[eluser]pickupman[/eluser]
You don't even need to use that. Appending a http:// in front of the resources creates a http request the browser needs to resolve in order for the browser to determine where to download the file. Using base_url() can also be an issue if you need to use https://. You can easily use an absolute url without http://. Just use a forward leading /.
Code:
<link  href="/global_assets/templates/default/css/body.css" rel="stylesheet" type="text/css" />

The leading slash means the path is always relative the root folder of the site. Without the leading slash the path is relative to the uri. Since CI uses SEO friendly URI's the browser interprets them like folders.


Messages In This Thread
Images, CSS, JS disappear on any controller, but home page - by El Forum - 08-31-2010, 09:00 PM



Theme © iAndrew 2016 - Forum software by © MyBB