Welcome Guest, Not a member yet? Register   Sign In
htaccess and static files
#1

[eluser]cinoob[/eluser]
I have the following directory structure:

/appname
application
css
images
js
system

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?
#2

[eluser]CroNiX[/eluser]
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?
#3

[eluser]cinoob[/eluser]
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.
#4

[eluser]Aken[/eluser]
Is that .htaccess file in your appname subfolder? Because it shouldn't work if it's in the root. Just curious.
#5

[eluser]cinoob[/eluser]
Hi Aken, yes it was in the appname folder.

Thanks




Theme © iAndrew 2016 - Forum software by © MyBB