CodeIgniter Forums
Can route rules affect images, css, and JS? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Can route rules affect images, css, and JS? (/showthread.php?tid=20903)



Can route rules affect images, css, and JS? - El Forum - 07-24-2009

[eluser]NateL[/eluser]
I'm having an issue where I've set up some route rules to pick up the first and second segments of the URI and do something with them.

Now, when I try to display an image, it doesn't work:

example.com/img/image.jpg triggers a 404 error.

With that said, where is a good place for all of my CSS, JS, and Images to be placed? public_html? or in CI views?


Can route rules affect images, css, and JS? - El Forum - 07-24-2009

[eluser]NateL[/eluser]
Should have searched first.....

It was the name of my images folder versus what I had in the htaccess file

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

I had my images folder named "img" when it should have been "images" - so that fixed it...