WordPress.org

Support

Support » Multisite » PDF mime-type in WordPress Multisite

PDF mime-type in WordPress Multisite

  • Hi guys!

    I have a problem with WordPress Multisite and PDF mime-types. I have a network with 2 blogs. The first (main) blog uploads it’s files to /wp-content/uploads/ and I have put a .htaccess file inside the /uploads/ directory that contains the proper mime-type to force PDF file download:

    :Location *.pdf
    	SetMime application/octet-stream
    :Location

    The problem is that I cannot set this for multisite blogs as the file address is dynamic. They are uploaded to /wp-content/blogs.dir/2/files and their download path is {SECOND BLOG DOMAIN DOMAIN}/files/filename.pdf.

    I have put a similar .htaccess file in both /wp-content/blogs.dir/ and /wp-content/blogs.dir/2/files/ but it doesn’t work.

    How can I solve this issue to force download PDF files on both sites?

Viewing 2 replies - 1 through 2 (of 2 total)
  • You should be able to put this in your .htaccess in the main WP folder (i.e. the one in the same folder as wp-config):

    AddType application/octet-stream .pdf

    I have tried this solution and it doesn’t work for me. My provider uses a different htacess structure but even if I put the correct one:

    :Location *.pdf
    	SetMime application/octet-stream
    :Location

    It still only works for the main blog and not the mu-sites. I asked the provider for help and they told me that this is a WordPress problem and I need to change WordPress config 🙁

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘PDF mime-type in WordPress Multisite’ is closed to new replies.
Skip to toolbar