Hi, Muad

I guess that you have a cms (would be nice to name it if it's not a
custom one) that handles all requests coming into the system. Think
now of How you know if the requested uri is a missing-image and write
it down as mod_rewrite rule.
Is this the only line you have in your .htaccess-script? What does the
cms with the request if the file is available? Does the cms here just
works like a proxy or is it doing some other magic? May it checks some
permissions first before it ships the file?

If you want to ungo passing requests for images to the cms, I'd do it like this:
It checkes if the request is pointing to a directory where only images
(or downloadable files) are located and lets apache do the rest to
provide the file. Or check for file-endings ...

RewriteRule \.(gif|jpg|jpeg|png)$ - [L]

You can then guess that all files ending with .jpeg, .jpg, .gif, .png
or similar are pictures, bypass the cms and let apache ship the file
or apaches 404-page if not available.
But this has nothing to do with PHP itself but is an apache-configuration.
Here's a beginner guide where I copied the line above:


On Mon, May 21, 2012 at 5:55 PM, muad shibani <muad.shib...@gmail.com> wrote:
> Hi there
> how I can ignore [missing]  images and other files completely in .htaccess
>  from being processed by the index.php file
> RewriteRule .* index.php [L]
> the CMS itself gives 404 error page for unknown request
> thanks in advance

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to