CodeIgniter Forums

Full Version: htaccess and static files
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

I have the following directory structure:


and this is my .htaccess file:

RewriteEngine on
RewriteCond $1 !^(index\.php|images|css|js|robots\.txt)
RewriteRule ^(.*)$ /appname/index.php/$1 [L]

I have no problem loading pages but no images are loading. I'm getting 404 errors for all contents in the images directory. No problems loading css or js files either.

Anyone got any ideas on why this may be?

El Forum

What do the img srcs look like in the html compared to the css/js?
Does your images dir have the same permissions and owner/group as the others?

El Forum

Resolved although I'm not too sure how. It was probably a permissions issue that caused it. I moved the images into a temp folder, deleted the images folder, recreated it and moved the images back in. All working now.

El Forum

Is that .htaccess file in your appname subfolder? Because it shouldn't work if it's in the root. Just curious.

El Forum

Hi Aken, yes it was in the appname folder.