jay0316 Posted April 8, 2011 Share Posted April 8, 2011 I've placed an htacess file with the code below into my folder with a bunch of artfiles. I wanted to use it so that when I create an anchor tag and link to one of those files it will download the file. It works like I wanted it to (files download when I click the link); however, I have a page that I created to display some of those files on. When the htaccess file is in the folder they do not display on this page. I'm using an img tag or object tag (for swf files). On this page the files don't show or download. Is there a line of code that will use this for anchor tags only? Why does this affect the img and object tag? If not, is there a better way to do what I'm trying to do (this seemed so easy)? <FilesMatch "\.(?i:jpg|gif|png|jpeg|tif|tiff|swf|pdf)$"> Header set Content-Disposition attachment </FilesMatch> Quote Link to comment https://forums.phpfreaks.com/topic/233128-filesmatch/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.