404 not found and ErrorDocument


I have uploaded two pdf files to the same folder. One I can get to:

And the other I can’t:

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?


Compare the file permissions between the two.


They are both 644. Darn!


Check your server logs.


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

You really should lock down your uploads folder, btw. Always a best practice with WordPress.


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.


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.


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

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


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


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