<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Codice per scrivere il passaggio dello spider]]></title><description><![CDATA[<p dir="auto">Ho una funzione sche scrive su file quando passano i vari bot:</p>
<p dir="auto">if (strstr($_SERVER['HTTP_USER_AGENT'], 'Googlebot')){$bot='Googlebot';}<br />
else if (strstr($_SERVER['HTTP_USER_AGENT'], 'Mediapartners')){$bot='Adsense';}<br />
else if (strstr($_SERVER['HTTP_USER_AGENT'], 'Slurp')){$bot='Hot Bot';}<br />
else if (strstr($_SERVER['HTTP_USER_AGENT'], 'ichiro')){$bot='ichiro';}<br />
else if (strstr($_SERVER['HTTP_USER_AGENT'], 'msnbot')){$str_bot='Msn';}<br />
else if (strstr($_SERVER['HTTP_USER_AGENT'], 'bingBot')){$str_bot='Bing';}</p>
<p dir="auto">Il guaio è che funziona a dovere von googlebot o ichiro, ma fallisce se invece il bon è bingbot o msnbot.</p>
<p dir="auto">A cosa può essere dovuto questo strano comportamento?<br />
Grazie</p>
]]></description><link>https://dev.connect.gt/topic/175518/codice-per-scrivere-il-passaggio-dello-spider</link><generator>RSS for Node</generator><lastBuildDate>Thu, 26 Nov 2026 00:47:37 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/175518.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 09 Aug 2012 20:48:49 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Codice per scrivere il passaggio dello spider on Thu, 16 Aug 2012 14:05:56 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto"><strong>netgreg</strong></p>
<p dir="auto">Sembra che il modulo sia presente, perchè queste due righe di codice, molto simili, funzionano bene:</p>
<h1>la prox riga redirect da senza www a  con www</h1>
<p dir="auto">RewriteCond %{HTTP_HOST} ^<a href="http://xprenotare.it" rel="nofollow ugc">xprenotare.it</a> [NC]<br />
RewriteRule ^(.*)$ www <a href="http://xprenotare.it/$1" rel="nofollow ugc">xprenotare.it/$1</a> [R=301,L]</p>
</blockquote>
<pre><code>            RewriteEngine On
            RewriteBase / 
            RewriteCond %{HTTP_USER_AGENT} ^BlackWidow [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^Bot\ mailto:craftbot@yahoo.com [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^ChinaClaw [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^DISCo [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^Download\ Demon [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^eCatch [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^EirGrabber [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^EmailSiphon [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^Express\ WebPictures [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^ExtractorPro [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^EyeNetIE [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^FlashGet [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^GetRight [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^Go!Zilla [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^Go-Ahead-Got-It [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^GrabNet [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^Grafula [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^HMView [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^HTTrack [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^Image\ Stripper [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^Image\ Sucker [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^InterGET [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^Internet\ Ninja [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^JetCar [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^JOC\ Web\ Spider [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^larbin [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^LeechFTP [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^Mass\ Downloader [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^MIDown\ tool [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^Mister\ PiX [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^Navroad [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^NearSite [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^NetAnts [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^NetSpider [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^Net\ Vampire [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^NetZIP [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^Octopus [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^Offline\ Explorer [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^Offline\ Navigator [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^PageGrabber [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^Papa\ Foto [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^pcBrowser [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^RealDownload [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^ReGet [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^Siphon [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^SiteSnagger [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^SmartDownload [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^SuperBot [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^SuperHTTP [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^Surfbot [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^tAkeOut [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^Teleport\ Pro [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^VoidEYE [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^Web\ Image\ Collector [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^Web\ Sucker [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^WebAuto [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^WebCopier [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^WebFetch [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^WebReaper [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^WebSauger [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^Website\ eXtractor [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^WebStripper [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^WebWhacker [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^WebZIP [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^Wget [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^Widow [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^Xaldon\ WebSpider [OR] 
            RewriteCond %{HTTP_USER_AGENT} ^Zeus
            RewriteRule ^.*$ [B]METTI QUA QUELLO CHE VUOI  [/B][L,R]
</code></pre>
<p dir="auto">Prova questo</p>
]]></description><link>https://dev.connect.gt/post/1081996</link><guid isPermaLink="true">https://dev.connect.gt/post/1081996</guid><dc:creator><![CDATA[aragonesse]]></dc:creator><pubDate>Thu, 16 Aug 2012 14:05:56 GMT</pubDate></item><item><title><![CDATA[Reply to Codice per scrivere il passaggio dello spider on Thu, 16 Aug 2012 13:54:40 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto"><strong>Aragonesse</strong></p>
<p dir="auto">Ti manca il mod_rewrite</p>
</blockquote>
<p dir="auto">Sembra che il modulo sia presente, perchè queste due righe di codice, molto simili, funzionano bene:</p>
<h1>la prox riga redirect da senza www a  con www</h1>
<p dir="auto">RewriteCond %{HTTP_HOST} ^<a href="http://xprenotare.it" rel="nofollow ugc">xprenotare.it</a> [NC]<br />
RewriteRule ^(.*)$ www <a href="http://xprenotare.it/$1" rel="nofollow ugc">xprenotare.it/$1</a> [R=301,L]</p>
]]></description><link>https://dev.connect.gt/post/1082001</link><guid isPermaLink="true">https://dev.connect.gt/post/1082001</guid><dc:creator><![CDATA[netgreg]]></dc:creator><pubDate>Thu, 16 Aug 2012 13:54:40 GMT</pubDate></item><item><title><![CDATA[Reply to Codice per scrivere il passaggio dello spider on Tue, 14 Aug 2012 23:01:49 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto"><strong>netgreg</strong></p>
<p dir="auto">Ho gia risposto ma non vedo nulla, riscrivo.</p>
<p dir="auto">Non credo che il mio hoster mi faccia toccare quel file, penso che oltre htaccess non mi lasci andare.</p>
<p dir="auto">Ad oggi ho provato vari per rendere il sito invisibile a vari bot, ma son riuscito sono con Deny Num_ip. Se il bot cambia ip... non funziona piu.</p>
<p dir="auto">Inoltre il server ho notato che risponde in modo strano: prima 301 e subito dopo 401.<br />
Senza contare che una volta in mezzo a due 401 ha risposto con un 200!</p>
<p dir="auto">Se non posso rendere il sito invisibile almeno redirigere le richieste ad un sito inesistente, come il codice sotto, che non va:</p>
<p dir="auto"><a href="/hashtags/sbarazziamoci">#sbarazziamoci</a> dei bot<br />
RewriteCond %{HTTP_USER_AGENT} ^BadBot [OR]<br />
RewriteCond %{HTTP_USER_AGENT} ^scoutjet [OR]<br />
RewriteCond %{HTTP_USER_AGENT} ^woopingbot<br />
RewriteRule ^(.<em>)$ http: <a href="//go.away/" rel="nofollow ugc">//go.away/</a><br />
<a href="/hashtags/rewriterule">#RewriteRule</a> ^.</em>$ http: <a href="//127.0.0.1" rel="nofollow ugc">//127.0.0.1</a> [R,L]</p>
</blockquote>
<p dir="auto">Ti manca il mod_rewrite</p>
]]></description><link>https://dev.connect.gt/post/1081995</link><guid isPermaLink="true">https://dev.connect.gt/post/1081995</guid><dc:creator><![CDATA[aragonesse]]></dc:creator><pubDate>Tue, 14 Aug 2012 23:01:49 GMT</pubDate></item><item><title><![CDATA[Reply to Codice per scrivere il passaggio dello spider on Tue, 14 Aug 2012 22:38:57 GMT]]></title><description><![CDATA[<p dir="auto">Ho gia risposto ma non vedo nulla, riscrivo.</p>
<p dir="auto">Non credo che il mio hoster mi faccia toccare quel file, penso che oltre htaccess non mi lasci andare.</p>
<p dir="auto">Ad oggi ho provato vari per rendere il sito invisibile a vari bot, ma son riuscito sono con Deny Num_ip. Se il bot cambia ip... non funziona piu.</p>
<p dir="auto">Inoltre il server ho notato che risponde in modo strano: prima 301 e subito dopo 401.<br />
Senza contare che una volta in mezzo a due 401 ha risposto con un 200!</p>
<p dir="auto">Se non posso rendere il sito invisibile almeno redirigere le richieste ad un sito inesistente, come il codice sotto, che non va:</p>
<p dir="auto"><a href="/hashtags/sbarazziamoci">#sbarazziamoci</a> dei bot<br />
RewriteCond %{HTTP_USER_AGENT} ^BadBot [OR]<br />
RewriteCond %{HTTP_USER_AGENT} ^scoutjet [OR]<br />
RewriteCond %{HTTP_USER_AGENT} ^woopingbot<br />
RewriteRule ^(.<em>)$ http: <a href="//go.away/" rel="nofollow ugc">//go.away/</a><br />
<a href="/hashtags/rewriterule">#RewriteRule</a> ^.</em>$ http: <a href="//127.0.0.1" rel="nofollow ugc">//127.0.0.1</a> [R,L]</p>
]]></description><link>https://dev.connect.gt/post/1082000</link><guid isPermaLink="true">https://dev.connect.gt/post/1082000</guid><dc:creator><![CDATA[netgreg]]></dc:creator><pubDate>Tue, 14 Aug 2012 22:38:57 GMT</pubDate></item><item><title><![CDATA[Reply to Codice per scrivere il passaggio dello spider on Tue, 14 Aug 2012 22:11:12 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto"><strong>netgreg</strong></p>
<p dir="auto">Grazie Aragonese,<br />
avevo provato un codice simile a qualo consigliato da te, ma non sono riuscito a farlo funzionare. Era diverso, non a veva il tag location.<br />
Ma spiegami meglio: va messo in htaccess, vero?</p>
</blockquote>
<p dir="auto">apache.conf</p>
]]></description><link>https://dev.connect.gt/post/1081994</link><guid isPermaLink="true">https://dev.connect.gt/post/1081994</guid><dc:creator><![CDATA[aragonesse]]></dc:creator><pubDate>Tue, 14 Aug 2012 22:11:12 GMT</pubDate></item><item><title><![CDATA[Reply to Codice per scrivere il passaggio dello spider on Tue, 14 Aug 2012 22:07:04 GMT]]></title><description><![CDATA[<p dir="auto">Grazie Aragonese,<br />
avevo provato un codice simile a qualo consigliato da te, ma non sono riuscito a farlo funzionare. Era diverso, non a veva il tag location.<br />
Ma spiegami meglio: va messo in htaccess, vero?</p>
]]></description><link>https://dev.connect.gt/post/1081999</link><guid isPermaLink="true">https://dev.connect.gt/post/1081999</guid><dc:creator><![CDATA[netgreg]]></dc:creator><pubDate>Tue, 14 Aug 2012 22:07:04 GMT</pubDate></item><item><title><![CDATA[Reply to Codice per scrivere il passaggio dello spider on Tue, 14 Aug 2012 21:19:41 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto"><strong>netgreg</strong></p>
<p dir="auto">Ho una funzione sche scrive su file quando passano i vari bot:</p>
<p dir="auto">if (strstr($_SERVER['HTTP_USER_AGENT'], 'Googlebot')){$bot='Googlebot';}<br />
else if (strstr($_SERVER['HTTP_USER_AGENT'], 'Mediapartners')){$bot='Adsense';}<br />
else if (strstr($_SERVER['HTTP_USER_AGENT'], 'Slurp')){$bot='Hot Bot';}<br />
else if (strstr($_SERVER['HTTP_USER_AGENT'], 'ichiro')){$bot='ichiro';}<br />
else if (strstr($_SERVER['HTTP_USER_AGENT'], 'msnbot')){$str_bot='Msn';}<br />
else if (strstr($_SERVER['HTTP_USER_AGENT'], 'bingBot')){$str_bot='Bing';}</p>
<p dir="auto">Il guaio è che funziona a dovere von googlebot o ichiro, ma fallisce se invece il bon è bingbot o msnbot.</p>
<p dir="auto">A cosa può essere dovuto questo strano comportamento?<br />
Grazie</p>
</blockquote>
<p dir="auto">Con gli spider sono più diretto di te <img src="https://dev.connect.gt/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=12b9555a9a1" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:1.4em;width:auto;vertical-align:middle" title=":)" alt="🙂" /></p>
<pre><code class="language-php">&lt;Location /&gt;     
        SetEnvIf User-Agent "msnbot" BlockUA     
        SetEnvIf User-Agent "bingbot" BlockUA     
        SetEnvIf User-Agent "Googlebot" BlockUA
        SetEnvIf User-Agent "Mediapartners" BlockUA
        SetEnvIf User-Agent "Slurp" BlockUA
        SetEnvIf User-Agent "Ikiro" BlockUA     
        Order allow,deny     
        Allow from all     
        Deny from env=BlockUA 
&lt;/Location&gt;
</code></pre>
<p dir="auto">Li chiudo fuori della porta a ciao ciao. Grazie a dio esiste Apache</p>
]]></description><link>https://dev.connect.gt/post/1081993</link><guid isPermaLink="true">https://dev.connect.gt/post/1081993</guid><dc:creator><![CDATA[aragonesse]]></dc:creator><pubDate>Tue, 14 Aug 2012 21:19:41 GMT</pubDate></item><item><title><![CDATA[Reply to Codice per scrivere il passaggio dello spider on Tue, 14 Aug 2012 20:32:14 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto"><strong>supercapocc</strong></p>
<p dir="auto">Prova a usare stristr() .</p>
</blockquote>
<p dir="auto">Grazie gia fatto, e trovato pure l'errore: usavo 2 nomi diversi come variabile di destinazione</p>
<p dir="auto">greg</p>
]]></description><link>https://dev.connect.gt/post/1081998</link><guid isPermaLink="true">https://dev.connect.gt/post/1081998</guid><dc:creator><![CDATA[netgreg]]></dc:creator><pubDate>Tue, 14 Aug 2012 20:32:14 GMT</pubDate></item><item><title><![CDATA[Reply to Codice per scrivere il passaggio dello spider on Fri, 10 Aug 2012 14:58:57 GMT]]></title><description><![CDATA[<p dir="auto">Prova a usare stristr() .</p>
]]></description><link>https://dev.connect.gt/post/1081992</link><guid isPermaLink="true">https://dev.connect.gt/post/1081992</guid><dc:creator><![CDATA[supercapocc]]></dc:creator><pubDate>Fri, 10 Aug 2012 14:58:57 GMT</pubDate></item></channel></rss>