How to add an extra rule to .htaccess

webguy

Verified User
Joined
Apr 13, 2005
Messages
41
Location
Best, Netherlands
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:
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
 
Back
Top