Share This Post

After upgrading a few plugins and the core WordPress files on a clients website, access to the uploaded images had been removed. Rather than showing uploaded images the screen would have the alt text in its place. When the image in question was displayed by its self in the browser, the message

Forbidden

you don’t have permission to access …(image file)…. on this server

Quickly investigating the file structure showed a htaccess file in the uploads folder. In this htaccess file was

deny from all

Seeing how that is too strict for our purposes, we would like users to be able to view images when coming to the site, I utilized the code shared by Tom Oliver in his protecting uploads with htaccess. By replacing the deny from all code with the code Tom provided in his post, security of the uploads folder was maintained while still providing access to the images.

A simpler and less secure solution would have been to simply rewrite the .htaccess as:

allow from all

More To Explore

SEO

Content is anything that adds value to the reader’s life. -Avinash Kaushik

Design

Design can be art. Design can be aesthetics. Design is so simple, that’s why it is so complicated. Paul Rand

Inspirational

Do one thing every day that scares you. -Anonymous

SEO

This is the era of Less-Is-More with SEO. -Adam Audette

Do You Want To Boost Your Business?

An image of three people in a meeting looking at laptops