<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Using FilesMatch and Files in htaccess</title>
	<atom:link href="http://www.askapache.com/htaccess/using-filesmatch-and-files-in-htaccess.html/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.askapache.com/htaccess/using-filesmatch-and-files-in-htaccess.html</link>
	<description>Web Development</description>
	<pubDate>Sun, 20 Jul 2008 16:56:12 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
		<item>
		<title>By: Playing with the X-Robots-Tag HTTP header - SEO - Joost de Valk's SEO Blog</title>
		<link>http://www.askapache.com/htaccess/using-filesmatch-and-files-in-htaccess.html#comment-35049</link>
		<dc:creator>Playing with the X-Robots-Tag HTTP header - SEO - Joost de Valk's SEO Blog</dc:creator>
		<pubDate>Sun, 20 Jan 2008 20:46:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.askapache.com.com/htaccess/using-filesmatch-and-files-in-htaccess.html#comment-35049</guid>
		<description>[...]Example uses of the X-Robots-Tag

If you want to prevent search engines from showing files you've generated with PHP, add the following in the header file:
&lt;pre&gt;&lt;br /&gt;
header(â€™X-Robots-Tag: noindexâ€™, true);&lt;br /&gt;
&lt;/pre&gt;
This would not prevent search engines from following the links on those pages, if you want to do that, do the following:
&lt;pre&gt;&lt;br /&gt;
header(â€™X-Robots-Tag: noindex, nofollowâ€™, true);&lt;br /&gt;
&lt;/pre&gt;
But doing it in PHP is probably not the easiest use for this kind of thing. I myself greatly prefer setting headers in Apache, when possible. Consider, for instance, preventing search engines from caching / showing a preview for all .doc files on your domain, you would only have to do the following:
&lt;pre&gt;&lt;br /&gt;
&#60;FilesMatch &#34;\.doc$&#34;&#62;&lt;br /&gt;
Header set X-Robots-Tag &#34;index, noarchive, nosnippet&#34;&lt;br /&gt;
&#60;/Files&#62;&lt;br /&gt;
&lt;/pre&gt;[...]</description>
		<content:encoded><![CDATA[<p>[...]Example uses of the X-Robots-Tag</p>
<p>If you want to prevent search engines from showing files you&#8217;ve generated with PHP, add the following in the header file:</p>
<pre>
header(â€™X-Robots-Tag: noindexâ€™, true);
</pre>
<p>This would not prevent search engines from following the links on those pages, if you want to do that, do the following:</p>
<pre>
header(â€™X-Robots-Tag: noindex, nofollowâ€™, true);
</pre>
<p>But doing it in PHP is probably not the easiest use for this kind of thing. I myself greatly prefer setting headers in Apache, when possible. Consider, for instance, preventing search engines from caching / showing a preview for all .doc files on your domain, you would only have to do the following:</p>
<pre>
&lt;FilesMatch &quot;\.doc$&quot;&gt;
Header set X-Robots-Tag &quot;index, noarchive, nosnippet&quot;
&lt;/Files&gt;
</pre>
<p>[...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
