We have a couple PDF files that are included in our WP-CONTENT folder which the links are not working. Trying to debug I created domain.com/wp-content/test.php and when I point the browser to this page I get a wordpress 404. Any idea what could be causing this? Below is a copy of our .htaccess file which is the only thing I can figure would be causing it but I don't see any issues.

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule !(js|ico|gif|jpg|png|css|swf|flv|libraries|maint|admin|login|logout|reg) index.php [QSA,L]

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress
  • How are you linking to them? Are you using them in your templates? – ngearing Jun 21 '16 at 1:21

I have experience with this issue and find solution maybe work with your problem

  1. Check Wp-Content Permission change to 775
  2. Delete or rename your .htaccess like .bkphtaccess
  3. Setting permalinks as default and save
  4. Turn back permalinks as your custom permalink and save If allowed new .htaccess will create automatic, if not copy text at the bottom permalink settings save as file .htaccess in root Wordpress Instalation

try to access your link

| improve this answer | |
  • Renaming the .htaccess and then having wordpress create a new one fixed the issue. The only thing that looks different is that this was in the .htaccess file – Brad Wickwire Jun 21 '16 at 15:41
  • <IfModule mod_rewrite.c> RewriteEngine on RewriteRule !(js|ico|gif|jpg|png|css|swf|flv|libraries|maint|admin|login|logout|reg) index.php [QSA,L] </IfModule> – Brad Wickwire Jun 21 '16 at 15:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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