CodeIgniter Forums
css and javascript not loading in localhost - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: css and javascript not loading in localhost (/showthread.php?tid=42056)



css and javascript not loading in localhost - El Forum - 05-24-2011

[eluser]departedmind[/eluser]
Hi, I copied codeigniter files from server to localhost. The site was not loading at first it always redirects to WAMP homepage. I changed the htaccess (below). Now the site is loading but the css and javascript does not load. I checked through firebug it shows the path of localhost.

this is my htaccess
Code:
RewriteEngine on
RewriteBase /CmpOnline
RewriteCond $1 !^(index\.php|images|javascript|stylesheets|uploads|robots\.txt)
RewriteRule ^(.*)$ index.php/$1 [L]

this is my config
Code:
$config['base_url']    = "http://localhost/CmpOnline/";
$config['index_page'] = "";
$config['uri_protocol']    = "AUTO";

And also the navigation links shows the path of localhost
e.g home = http://localhost
aboutus == http://localhost/aboutus

I am new to CI, still reading the user guide, but I cannot understand why this is not working.

Any help, guidance will be most welcome.

Thanks