All of the twitter status updates around the wordpress sidebar have bit.ly links. After I click them, I recieve the 404 page because rather than going bit.ly/uniquenumber it attempts to go www.domain.com/blog/"http://bit.ly/uniquenumber/" with www.domain.com/blog being the home page for that wordpress blog.

Can there be a good way to prevent adding www.domain.com/blog and quotes and taking us towards the actual link?

Any help could be appreciated. This is actually the code :

/* These prefixes and suffixes will display before and after the entire block of tweets. */  
        $prefix = ""; // Prefix - some text you want displayed before all your tweets.  
        $suffix = ""; // Suffix - some text you want displayed after all your tweets.  
        $tweetprefix = ""; // Tweet Prefix - some text you want displayed before each tweet.  
        $tweetsuffix = "<br \><br \>"; // Tweet Suffix - some text you want displayed after each tweet.  

        $feed = "http://search.twitter.com/search.atom?q=from:" . $username . "&rpp=1" . $limit;  

        function parse_feed($feed, $prefix, $tweetprefix, $tweetsuffix, $suffix) {  

        $feed = str_replace("&lt;", "<", $feed);  
        $feed = str_replace("&gt;", ">", $feed);  
        $clean = explode("<content type=\"html\">", $feed);  

        $amount = count($clean) - 1;  

        echo $prefix;  

        for ($i = 1; $i <= $amount; $i++) {  
        echo $tweetsuffix;
        $cleaner = explode("</content>", $clean[$i]);  
        echo $tweetprefix;  
        echo $cleaner[0]; echo $suffix; echo $tweetsuffix;  ?>

        <img src="<?php echo get_bloginfo('template_directory');?>/images/side.png" alt="A line dividing the twitter updates and the open courses listing">
        <?php 
        }    
        echo $suffix;  
        }  

        $twitterFeed = file_get_contents($feed);  
        parse_feed($twitterFeed, $prefix, $tweetprefix, $tweetsuffix, $suffix);  

If you are link will www.domain.com/blog/"http://bit.ly/uniquenumber/", it is because there's an additional " at the beginning of the bitly url. If your url does not begin with a precise protocol (http, https, ftp etc) the browser will append it to the present folder.

without seeing the code and knowing because of your comment, it appears such as the links are malformed on whatever plug-was producing the hyperlinks, most likely not cited right, and that's why they're turning up within the URL.