CodeIgniter Forums
can this be done in htaccess? - 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 this be done in htaccess? (/showthread.php?tid=45932)



can this be done in htaccess? - El Forum - 10-11-2011

[eluser]Unknown[/eluser]
My htaccess file is working just fine as it is, but I was wondering if it's possible to modify it so that it no longer sends missing file requests (jpg, css, etc) back to the index. Ideally, I would rather the system throw an Apache 404 and not load CI all over again for each missing file.


Here is what I'm currently using...
Code:
RewriteEngine On

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d

RewriteRule ^(.+) - [PT,L]
RewriteRule ^(.*)$ /index.php/$1 [L]


Any ideas are welcome.

Thanks.