CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   Apache configuration (http://www.codingforums.com/forumdisplay.php?f=69)
-   -   htaccess multiple condition check (http://www.codingforums.com/showthread.php?t=281412)

nicky77 11-07-2012 01:57 PM

htaccess multiple condition check
 
Hi, I am trying to force PDF files to download when the user's browser is IE, but display in the browser for all other cases. I have the PDF download part working, but not sure how to combine this with the browser check. Any ideas? Thanks

This is what I have currently but obviously doesn't combine the conditions

Code:

SetEnvIfNoCase User-Agent (Opera|Chrome|Version|Firefox|MSIE)[\/|\s](\d+)\. browser=$1 version=$2
SetEnvIf browser MSIE browser=IE
SetEnvIf Request_URI "\.pdf$" requested_pdf=pdf
Header add Content-Disposition "attachment" env=requested_pdf



All times are GMT +1. The time now is 04:33 AM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.