Jump to content
Sign in to follow this  
siberneil

Website Images Will Not Display? Permission Error

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

Share this post


Link to post
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 :)

Share this post


Link to post
Share on other sites

Good job of figuring it out.Thanks for posting the solution.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...