Go Back   CodingForums.com > :: Server side development > Apache configuration

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-07-2012, 01:57 PM   PM User | #1
nicky77
New Coder

 
Join Date: Aug 2007
Posts: 93
Thanks: 9
Thanked 0 Times in 0 Posts
nicky77 is an unknown quantity at this point
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
nicky77 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:44 AM.


Advertisement
Log in to turn off these ads.