Jump to content

FilesMatch


jay0316

Recommended Posts

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>

Link to comment
https://forums.phpfreaks.com/topic/233128-filesmatch/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.