views:

63

answers:

4

On this site: http://church.allthingswebdesign.com/

None of my images are displaying anymore. They used to, but i'm not sure why they don't anymore. Not sure if it's something i've changed or what.

I'm 100% positive the images exist in the folder images because i've checked the remote copy of the files to make sure i can preview them and i can.

EDIT:

I had one redirection setup to redirect www.allthingswebdesign.com to allthingswebdesign.com. I thought this is what was causing it, but when i deleted that redirect through the cpanel, it still didn't change anything. Does this take some time to go into effect?

Here is the .htaccess file that i found on the server, probably from the redirect i setup in the cpanel. Would this be the cause?

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://allthingswebdesign.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://allthingswebdesign.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.allthingswebdesign.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.allthingswebdesign.com$      [NC]
RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ http://allthingswebdesign.com [R,NC]
+1  A: 

the links to the images are not correct - currently the images are trying to be found at http://church.allthingswebdesign.com/images/church.jpg and this location redirects to allthingswebdesign.com

if you check the links are working correctly then your problem will be fixed

PaulStack
+3  A: 

The image files seem to be there, because you have directory listing turned on on your webserver: http://church.allthingswebdesign.com/images/

However the actual image URLs such as http://church.allthingswebdesign.com/images/church.jpg redirect to http://www.allthingswebdesign.com , so there must be some server-side script/configuration doing that.

RoToRa
see my edit above please
Catfish
Sorry, web server configuration isn't my area of expertise and neither is really Stackoverflow. Maybe you should try http://serverfault.com/ ?
RoToRa
@RoToRa SO should be okay with this. Maybe a retag will help...
Yi Jiang
+1  A: 

You've got a duff rewrite rule somewhere in your .htaccess or httpd.conf files. If you try to access an image directly you get redirected to http://allthingswebdesign.com/


EDIT: Your problem is definitely your rewrite rules.

Your HTTP_REFERER will be "church.allthingswebdesign.com" so all those conditions will be true and the rewrite rule following says "Assuming the above conditions are true, any request for an image should be redirected to http://allthingswebdesign.com"

The simplest solution would be to add more conditions:

RewriteCond %{HTTP_REFERER} !^http://church.allthingswebdesign.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://church.allthingswebdesign.com$      [NC]
Paolo
i just see that you edited your answer after i started a bounty. I'll try your answer when i get home.
Catfish
Adding those 2 lines to the end didn't work. Any other suggestions?
Catfish
Did you add them just before the RewriteRule line?
Paolo
Oh no i added them at the end. I'll try that.
Catfish
+2  A: 

Fiddler2 is showing all the images are returning 302 (redirect). Sounds like Apache has an errant redireect somewhere. This is what I am getting:

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>302 Found</title>
</head><body>
<h1>Found</h1>
<p>The document has moved <a href="http://allthingswebdesign.com"&gt;here&lt;/a&gt;.&lt;/p&gt;
<hr>
<address>Apache/2.2.16 (Unix) mod_ssl/2.2.16 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at church.allthingswebdesign.com Port 80</address>
</body></html>
pjabbott