<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>TimeWaster's Place &#187; force</title>
	<atom:link href="http://www.timewaster.de/tag/force/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.timewaster.de</link>
	<description>Programming, Design, Tekkie Stuff and more</description>
	<lastBuildDate>Wed, 04 Aug 2010 14:02:03 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to force file downloading with htaccess</title>
		<link>http://www.timewaster.de/how-to-force-file-downloading-with-htaccess/</link>
		<comments>http://www.timewaster.de/how-to-force-file-downloading-with-htaccess/#comments</comments>
		<pubDate>Wed, 01 Jul 2009 17:34:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[config]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[force]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[picture]]></category>

		<guid isPermaLink="false">http://www.timewaster.de/?p=154</guid>
		<description><![CDATA[Nearly every browser will show image oder video files you want to provide for download in the browser itself instead of opening a download dialog.
Most of the websites suggest to use this code in your .htaccess:
&#60;FilesMatch "\.(jpg&#124;zip&#124;avi)$" &#62;
	ForceType application/octet-stream
&#60;/FilesMatch&#62;
But this is not enough! Even when the MIME-Type is set to &#8220;octet-stream&#8221;, some browsers will still [...]]]></description>
			<content:encoded><![CDATA[<p>Nearly every browser will show image oder video files you want to provide for download in the browser itself instead of opening a download dialog.</p>
<p>Most of the websites suggest to use this code in your .htaccess:</p>
<p><code>&lt;FilesMatch "\.(jpg|zip|avi)$" &gt;<br />
	ForceType application/octet-stream<br />
&lt;/FilesMatch&gt;</code></p>
<p>But this is not enough! Even when the MIME-Type is set to &#8220;octet-stream&#8221;, some browsers will still open the files their selfs because they have detected the .jpg or .avi file extension.</p>
<p>The solution to this is to add the following header:</p>
<p><code>&lt;FilesMatch "\.(jpg|zip|avi)$" &gt;<br />
	ForceType application/octet-stream<br />
	Header add Content-Disposition "attachment"<br />
&lt;/FilesMatch&gt;</code></p>
<p>With this header every browser i tested opened a download dialog, regardless of which file extension is present.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.timewaster.de/how-to-force-file-downloading-with-htaccess/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
