blocking a URL server from my apache webserver

paries used Ask the Experts™
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?

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

For more information, see the following Apache documentation:
Wouldn't it be better to find the image file and replace it or delete it?
  find /var/www/ -name BADIMAGE.jpg -exec rm {} \;

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