<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title>Retour à La Source • Tag: htaccess • RSS</title>
		<link>http://www.ab-d.fr/tag/htaccess/</link>
		<description>Retour à La Source • Tag: htaccess • RSS</description>
		<copyright>http://www.ab-d.fr/tag/htaccess/ (c) 2012</copyright>
		<language>fr</language>
		<pubDate>Sun, 05 Feb 2012 01:28:45 +0100</pubDate>
		<generator>Retour à La Source • Tag: htaccess • RSS • version 1.0</generator>
		<webMaster>noreply@ab-d.fr ( Benoit Asselin )</webMaster>
		<image>
			<url>http://www.ab-d.fr/images/rss.gif</url>
			<title>Retour à La Source • Tag: htaccess • RSS</title>
			<link>http://www.ab-d.fr/tag/htaccess/</link>
			<width>90</width>
			<height>30</height>
		</image>

		<item>
			<title>Comment forcer le téléchargement d'un fichier ? ( Header, FilesMatch )</title>
			<link>http://www.ab-d.fr/date/2009-01-09/</link>
			<pubDate>Fri, 09 Jan 2009 22:00:22 +0100</pubDate>
			<author>noreply@ab-d.fr ( Benoit Asselin )</author>
			<category><![CDATA[htaccess]]></category>
			<category><![CDATA[Regex]]></category>
			<description><![CDATA[<p>
Comment forcer le téléchargment d'un fichier sans utiliser de script PHP (ou autres...) ?<br />
Solution : Un simple fichier <code>.htaccess</code> à placer dans le dossier désiré !
</p>

<pre>
&lt;IfModule mod_headers.c&gt;
	&lt;FilesMatch &quot;\.(jpe?g)$&quot;&gt;
		ForceType image/jpeg
		Header set Content-Disposition attachment
	&lt;/FilesMatch&gt;
&lt;/IfModule&gt;
</pre>

<p><em>
A noter : en cas de dysfonctionnement, cela veut dire que le <code>mod_headers</code> n'est pas installé, ou est indisponible sur votre serveur Apache.
</em></p>

<p>
Documentation officielle :<br />
&bull; http://httpd.apache.org/docs/2.0/mod/core.html#filesmatch<br />
&bull; http://httpd.apache.org/docs/2.0/mod/mod_headers.html<br />
</p>

<hr /><a href="http://res.feedsportal.com/viral/bookmark_fr.cfm?link=http%3A%2F%2Fwww.ab-d.fr%2Fdate%2F2009-01-09%2F&title=Comment+forcer+le+t%C3%A9l%C3%A9chargement+d%27un+fichier+%3F+%28+Header%2C+FilesMatch+%29"><img src="http://www.ab-d.fr/images/bookmark.gif" border="0" /></a><br /><br />]]></description>
			<comments>http://www.ab-d.fr/tag/htaccess/</comments>
			<guid isPermaLink="false">http://www.ab-d.fr/date/2009-01-09/</guid>
		</item>

	</channel>
</rss>

