webguy
Verified User
Hi all,
I would like to add an extra rule to the .htaccess file, to make shure that when you click on a link to a PDF file, you ALWAYS get the question to save or open the PDF.
I read that in this article:
http://www.askapache.com/htaccess/pdf-plugin-adobe.html
To achieve that, I will need to enter the following to the .htaccess file:
Some of it however, is already in the .htaccess file. Can any one tell me, how to integrate this into this existing part of .htaccess in a way that the existing rules keep functioning?:
Thanks in advance,
Rene
I would like to add an extra rule to the .htaccess file, to make shure that when you click on a link to a PDF file, you ALWAYS get the question to save or open the PDF.
I read that in this article:
http://www.askapache.com/htaccess/pdf-plugin-adobe.html
To achieve that, I will need to enter the following to the .htaccess file:
Code:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.+)\.pdf$ /cgi-bin/pdf.php?file=$1 [L,NC,QSA]
Some of it however, is already in the .htaccess file. Can any one tell me, how to integrate this into this existing part of .htaccess in a way that the existing rules keep functioning?:
Code:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/index.php
RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$ [NC]
RewriteRule (.*) index.php
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
Thanks in advance,
Rene