* @license GPL * * tekArtist WordPress Theme * Copyright (C) 2007 Stephane Daury * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ $domain = preg_replace('|^(.*\.)?(.*?)\.(.*?)$|', '\2.\3', $_SERVER['SERVER_NAME']); $wpAddress = '../../../blog/?s='; $googleAddress = 'http://www.google.com/search?sitesearch='.$domain.'&domains='.$domain.'&q='; $targetAddress = ''; if(!isset($_REQUEST['s'])){ $targetAddress = $wpAddress; } else{ $query = $_REQUEST['s']; if(strlen($query) < 1){ $targetAddress = $wpAddress; } else{ if(!isset($_REQUEST['t'])){ $site = 'wp'; } else{ $site = $_REQUEST['t']; if($site !== 'google'){ $site = 'wp'; } } if($site === 'google'){ $targetAddress = $googleAddress.urlencode($query); } else{ $targetAddress = $wpAddress.urlencode($query); } } } if(header('Location:'.$targetAddress)){ exit; } else{ print '<'.'?xml version="1.0" encoding="utf-8"?'.">\n"; ?> Search redirect

Search script redirect: click here if your are not immediately redirected.