• Hello,

    New to WordPress – so I apologize for me amateur question.

    I upoaded a PDF to my root folder through FTP, but noticed immediately that each time I try to link to the file, I get a ‘Page Not Found’. I am assuming this is an issue with my .htaccess file? If so – how do I edit to allow links to download PDF files direction?

    Here is what I am trying – but is not working:

    # 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]
    </IfModule>

    # END WordPress

    <Files ~ “\.(pdf)$”>
    order deny,allow
    allow from all
    </Files>

    <FilesMatch “\.(?i:pdf)$”>

    ForceType application/octet-stream

    Header set Content-Disposition attachment

    </FilesMatch>

    Thank you!

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Edit .htaccess to allow PDF?’ is closed to new replies.