Jump to content

Website Images Will Not Display? Permission Error


siberneil
 Share

Recommended Posts

I have several different websites posted on one server. All of the websites but one function correctly. The last website will not display any images that are posted on that site. It will display pictures linked from other locations, just not the ones on the server. If I type the url of the image into my web browser I get a Forbidden error, so obviously there is a permission setting somewhere that has been altered. I have performed chmod several times to no avail. I adjusted permissions from within my FTP program, and I have deleted the files and folders completely off the server and then re-uploaded them. But I still cannot get my images to display.The background image from my wordpress installation will not display either, and that image is not stored in the default image folder.I have been searching the internet for an answer to my problem with no success.Any help offered will be greatly appreciated.

Edited by siberneil
Link to comment
Share on other sites

Ok I figured it out. For anyone else out there that may run in to this same problem here is how this problem occurred and how it was fixed.I had created the .htaccess file in my main directory containing the following information:RewriteEngine onIndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*AuthName mydomain.com<Limit GET POST>order deny,allowdeny from allallow from all</Limit><Limit PUT DELETE>order deny,allowdeny from all</Limit>RewriteCond %{HTTP_REFERER} !^$RewriteCond %{HTTP_REFERER} !^http://mydomain.com/.*$ [NC]RewriteRule .*\.(gif|jpe?g|png|bmp)$ - [F,NC]The last line is to prevent anyone from leeching pictures from my website. The 'F' flag tells the server to display forbidden if anyone tries to access any pictures.The line above it is used to "whitelist" my website. That means that my website is allowed to have access to the files.The solution:My domain ends in .org not .com, so I was allowing mydomain.com not .org to access my pictures.It only took me three days to figure that one out :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...