Welcome Guest, Not a member yet? Register   Sign In
JS/CSS/IMG files producing a 404 error
#1

[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!
#2

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

[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.
#4

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

Or

Phil's Asset Library

InsiteFX
#5

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

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

Use Phil's Asset Library!

InsiteFX




Theme © iAndrew 2016 - Forum software by © MyBB