[eluser]Unknown[/eluser]
The way public resources like js or css should be handled is this:
1) make a public folder in the root file
2) make folders for each resource types
3) if you mod_rewrite make a roule for that public folder
4) use relative paths from the index.php (from root) to public folders like
/public/js/cool.js
As simple as that
Xtreaming CI