It should be done via htaccess or Server Side scripting
htaccess:
redirect all bots using htaccess apache
PHP: something like
//returns 1 if the user agent is a bot
function is_bot($user_agent)
{
//if no user agent is supplied then assume it's a bot
if($user_agent == "")
return 1;
//array of bot strings to check for
$bot_strings = Array( "google", "bot",
"yahoo", "spider",
"archiver", "curl",
"python", "nambu",
"twitt", "perl",
"sphere", "PEAR",
"java", "wordpress",
"radian", "crawl",
"yandex", "eventbox",
"monitor", "mechanize",
"facebookexternal"
);
foreach($bot_strings as $bot)
{
if(strpos($user_agent,$bot) !== false)
{ return 1; }
}
return 0;
}
Atention This is strongly discouraged by Google. I only post this 'cause sometimes it can be useful.
edit
It always amazes me the capacity to reinvent the wheel. If anyone wants to generate sitemaps please take a look at:
http://code.google.com/p/sitemap-generators/wiki/SitemapGenerators
There's also some paid services.