404 not found and ErrorDocument


#1

I have uploaded two pdf files to the same folder. One I can get to:
http://innisarden.org/wp-content/uploads/2011/09/nonmember.pdf

And the other I can’t:
http://innisarden.org/wp-content/uploads/2011/09/members.pdf

I can see it using Filezilla but the result is
"404 Not Found error was encountered while trying to use an ErrorDocument"

This is such a simple task that isn’t working and it’s driving me crazy!! Any clues?


#2

Compare the file permissions between the two.


#3

They are both 644. Darn!


#4

Check your server logs.


#5

It’s there. You have a space after “members” and before “.pdf” in the file name:

http://innisarden.org/wp-content/uploads/2011/09/members%20.pdf
[hr]
You really should lock down your uploads folder, btw. Always a best practice with WordPress.


#6

Good job, detective! Now I’m wondering why WordPress is letting users browse an uploads directory. I thought it was off by default. I always add this to my .htaccess file:
Options -Indexes

That should put a stop to that.


#7

Nope. It’s always on, unless you turn it off. Which is odd, because on wordpress.com, it’s always off. This generally is problematic, except in this case, which is the exception that proves the rule.


#8

Using Filezilla, ‘empty directory listing’. Is there some other way besides Filezilla that would open the directory?
[hr]

You are a smarty pants and I’m a dumb***. THANKYOU!


#9

I’ve made this error myself. More than once. I’m sure I’ll make it again. :wink:


#10

Well, the solution was right under a nose, but I haven’t noticed it too at the first glance! Some things like that one are likely to happen accidentally though, but for the vast cases it caused by corrupted PDF formatting, I noticed. I ran into the same but with such a plenty of documents and the very solution I found was to rewrite every single one of them manually, uploading the editor like this one https://4000a-125-2-form.pdffiller.com/ and then saving as a new file. I guess it will work as well using Adobe Acrobat Pro or Foxit Phantom, but I had none of them purchased as well as they cost more for the same features