[ciapug] Logging outgoing traffic while being crawler
friendly
Claus
ciapug@cialug.org
Fri, 30 May 2003 08:53:35 -0500
That doesn't resolve the problem. The link in the page still doesn't look
like <a href="http://www.ames.ia.us"> thus doesn't get phrased as a link to
that site by the crawler. Instead it's just a link to an imaginary page <a
href="http://www.mysite.com/go/www.ames.ia.us">.
I doubt the crawlers are designed to actually try out the links to
determine where they go to.
At 04:46 PM 05/29/2003, David Champion wrote:
>Could you maybe do something with either rewrite, or some kind of error
>handling, and make the link like:
>
><a href="go/www.ames.ia.us">Go to the City of Ames site</a>
>
>...then your magic thingy looks for anything after "go/" and redirects.
>
>-dc
>
>Claus wrote:
>>Hello
>>I have a php redirect page that I use to redirect outgoing links
>>through. That way I can keep track of what links people use from my
>>site. Things work great with the exception that search engines /
>>crawlers don't account these links. So for instance the link to
>>/go.php?http://www.ames.ia.us will never get put into the "Find web pages
>>that link to www.ames.ia.us" list of google. That's because it doesn't
>>appear as a link.
>>Is there another way that could do both, track outgoing links and be
>>crawler friendly?
>>Thanks,
>> Claus
>>----Link----
>><A HREF="/go.php?http://www.ames.ia.us"
>> onMouseOver="window.status='http://www.ames.ia.us'; return true"
>> onMouseOut="window.status=''; return true">
>> Ames City Government</A>
>>----Redirection/Logging Page----
>><?php
>> $link = getenv('QUERY_STRING');
>> if ($REMOTE_ADDR != 'insert my ip here' &&
>> $REMOTE_ADDR != 'insert my other ip here') {
>> require_once('DB.php');
>> $db = DB::connect('pgsql://www@unix+localhost/database');
>> if (DB::isError($db)) {die ($db->getMessage());}
>> $result = $db->query("insert into web_stats_links_visited
>> (timestamp, server
>>_name, remote_ip, remote_name, url) values (current_timestamp,
>>'$SERVER_NAME', '
>>$REMOTE_ADDR', ' ', '$link')");
>> if (DB::isError($result)) {die ($result->getMessage());}
>> $db->disconnect();
>> }
>> header("Location: " . $link);
>> exit;
>>?>
>>_______________________________________________
>>ciapug mailing list
>>ciapug@cialug.org
>>http://cialug.org/mailman/listinfo/ciapug
>
>
>_______________________________________________
>ciapug mailing list
>ciapug@cialug.org
>http://cialug.org/mailman/listinfo/ciapug