I have a WordPress multi-site with 4 subdomains. All PDFs in the main domain site work fine while on subdomain I get Forbidden access for certain PDFs. For instance when I open:


it opens normally, but when I open


I get:

Access forbidden!

You don't have permission to access the requested object. It is either read-protected or not readable by the server.

If you think this is a server error, please contact the webmaster. Error 403

here the .htaccess codes

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]

# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]

I disabled all plugins but it still does not work.

I put .htaccess to allow PDF files but does not work.

what should I do now?

  • Are the file permissions of these files the same? How exactly did you "put .htaccess to allow PDF files"? – MrWhite Oct 17 '19 at 22:22
  • Have you spoken with your hosting provider? – Tom J Nowell Oct 17 '19 at 23:20
  • A quick tip for getting great answers: Many experts are busy people. Help them get to all the facts as soon as possible (without asking follow up questions) and you will get many more answers. Check our guide to asking good questions if you need to. – Matthew Brown aka Lord Matt Oct 18 '19 at 2:08
  • @MrWhite yes both files are the same permissions, even the new uploades get access forbidden too, I put a .htaccess file include Order deny,allow Deny from all <Files ~ ".(pdf|csv|doc|docx|jpe?g|png|gif|ppt|pptx)$"> Allow from all </Files> but doesnot work – Koa Oct 18 '19 at 5:28
  • @TomJNowell I am the server owner windows server II with apache server insalled xammp – Koa Oct 18 '19 at 5:30

Your Answer

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

Browse other questions tagged or ask your own question.