blocking a URL server from my apache webserver

paries
paries used Ask the Experts™
on
Hello ,
I am not sure this is possible. My website has customer created content. On some of the pages there are inappropriate images being posted. The image name is always the same.

Is there a way that apache can filter/block that image while the page is being served?

Thanks
Randy
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
You should be able to put the following into your apache config under the section where you define directories for your user content:

<files badimage.jpg>
deny from all
</files>

For more information, see the following Apache documentation:
http://httpd.apache.org/docs/2.2/mod/core.html#files
Wouldn't it be better to find the image file and replace it or delete it?
  find /var/www/ -name BADIMAGE.jpg -exec rm {} \;
or

Maybe you should talk to the customer.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial