CodeIgniter Forums
JS/CSS/IMG files producing a 404 error - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: JS/CSS/IMG files producing a 404 error (/thread-34508.html)



JS/CSS/IMG files producing a 404 error - El Forum - 10-01-2010

[eluser]yazdog8[/eluser]
I'm a bit new to CI and not the best framework person out there. I'm getting 404 errors for all of my external files like javascript, css and images. Here's my .htaccess file:

Code:
RewriteEngine on

# enable symbolic links
Options +FollowSymLinks
Options -Multiviews

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond $1 !^(index\.php|images|css|js|yui|robots\.txt)

RewriteRule ^(.*)$ /index.php?$1 [L]

I'm hosted with godaddy, and the CI site is actually accessed through a subdomain: dev.paulsenweb.com. I'm guessing the subdomain may be the problem? In the Server API CGI/FastCGI is the return from php_info(). The files themselves are hosted in a folder called codeigniter off of the root. So the js/css/images are sitting essentially in the /codeigniter/system folder.

Any help would be greatly appreciated!


JS/CSS/IMG files producing a 404 error - El Forum - 10-04-2010

[eluser]yazdog8[/eluser]
Bump. Any ideas?


JS/CSS/IMG files producing a 404 error - El Forum - 12-22-2010

[eluser]fobin[/eluser]
I think I've got the same issue. I've got all my images, js and css in resources folder. Locally I don't get any errors (using mamp) but on the live web server I get lot of errors like this:
ERROR - 2010-12-22 08:39:06 --> 404 Page Not Found --> resources

EDIT: and to add firebug shows everything loading up nicely.


JS/CSS/IMG files producing a 404 error - El Forum - 12-22-2010

[eluser]InsiteFX[/eluser]
Try this in your html file.
Code:
<head>
    <base href="<?php echo base_url(); ?>">
</head>

Or

Phil's Asset Library

InsiteFX


JS/CSS/IMG files producing a 404 error - El Forum - 12-22-2010

[eluser]fobin[/eluser]
At least the head tag trick didn't work.


JS/CSS/IMG files producing a 404 error - El Forum - 12-23-2010

[eluser]InsiteFX[/eluser]
It sounds like your paths are not right!

Use Phil's Asset Library!

InsiteFX