Welcome Guest, Not a member yet? Register   Sign In
[SOLVED] .htacces: blocking images and CSS files
#1

[eluser]tomitzel[/eluser]
Hello,
I've just started working with CodeIginter building a website. Now I'm trying to remove the "index.php" from all URLs, so I've created the following .htaccess file:
Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt|resources|css|img)
RewriteRule ^(.*)$ /index.php/$1 [L]

All the URL for the CSS and images are created corect, but as along as the .htaccess file is present I can't access them (I get a 404 error). I've checked the permission of the files, its 755, so there's no problem with the file permission.

Any sugestions?
Thanks!
#2

[eluser]tomitzel[/eluser]
I solved it, I had my application moved outsite de system folder, so I had to put add it to my RewriteCond:
Code:
RewriteCond $1 !^(index\.php|images|robots\.txt|resources|css|img|system|application)




Theme © iAndrew 2016 - Forum software by © MyBB