Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have an image that I've uploaded through the WP media library. I can see this image in my uploads folder via ssh/ftp. I cannot see this image if I put the URL in my browser, like www.site.com/files/image.jpg (It's a multisite and all uploads go into individual folders rather than be separated out by months).

In WP, the image shows as broken in the media library listing of uploaded files. Only when I select this image file and choose "edit image" does the image show up.

The 404 is not the regular WP 404 page template, it's a blank page that only says "404 — File not found."

And the best part is that this does not happen for all images/uploads.

Does anyone have any ideas I can take action on?

EDIT: It looks like any file with "pdf" in the file NAME (not file extension) is having this problem. .pdf files work fine. I don't know why the filename would make this happen...

share|improve this question
    
The fact that you get a generic 404 makes me think there is a serious server issue/error before WordPress even gets involved. Check your server logs and see if the shed any light. –  s_ha_dum Jan 31 '13 at 15:18

1 Answer 1

up vote 0 down vote accepted

It turned out to be an .htaccess rule put in by a coworker. It was supposed to target just some .pdf files but the rule wasn't written strict enough.

So that was a fun few hours spent on wild goose chases.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.