rName ) > 34 ) ? substr($rs->rName, 0, 34) . "..." : $rs->rName; $redir_url = 'http://www.recipebits.com/recipe/' . preg_replace("/ /", "-", $rs->rName ) . '-' . $rs->rid . ".html"; } }else{ $redir_url = 'http://www.recipebits.com/cook/' . preg_replace("/ /", "-", $_GET['recipe_category']) . '-Recipes.html'; } }else{ $redir_url = 'http://www.recipebits.com'; } Header( "HTTP/1.1 301 Moved Permanently" ); Header( "Location: $redir_url" ); ?>