Welcome Guest, Not a member yet? Register   Sign In
bypass images directory
#2

[eluser]The Fox[/eluser]
Are you using CI to send all your images to the browser? Like you have a controller called images that you use to send your GIFs? (Just making sure I understand you.)

I think option A is your best choice. I have Apache configured to rewrite all requests to my CI app, except those requests for a few certain files and directories. I.E. requests for example.com/controller/method/ are sent behind-the-scenes to example.com/index.php/controller/method so CI can handle them. In fact, anything after the first slash is always sent to index.php, except for the following folders and files: /graphics, /icons, /js, /css, robots.txt, favicon.ico, etc... These files and directories are handled by the web server like normal.

Here's the Apache configuration for that. I put this in my vhost file. Not sure if you can do this with .htaccess or not.

Code:
<IfModule mod_rewrite.c>
    RewriteLogLevel        0
    RewriteLog /your-optional-log-file
    RewriteEngine On
    RewriteCond %{REQUEST_URI}
    !^(/index\.php|/graphics|/icons|/js|/css|/robots\.txt|/favicon\.ico)
    RewriteRule ^(.*)$ /index.php/$1 [L]
</IfModule>


Messages In This Thread
bypass images directory - by El Forum - 01-14-2008, 08:07 PM
bypass images directory - by El Forum - 01-15-2008, 12:16 PM



Theme © iAndrew 2016 - Forum software by © MyBB