diff -Naur ./uc_store/uc_store.module ../ubercart/uc_store/uc_store.module
--- ./uc_store/uc_store.module	2011-09-21 13:17:19.000000000 -0500
+++ ../ubercart/uc_store/uc_store.module	2011-09-22 16:14:12.000000000 -0500
@@ -570,7 +570,7 @@
   if (referer_uri() == '') {
     $protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') ? 'https' : 'http';
     $q = isset($_GET['q']) ? $_GET['q'] : '';
-    $_SESSION['uc_referer_uri'] = $protocol .'://'. $_SERVER['SERVER_NAME'] . $GLOBALS['base_path'] . $q;
+    $_SESSION['uc_referer_uri'] = $protocol .'://'. $_SERVER['HTTP_HOST'] . $GLOBALS['base_path'] . $q;
   }
   else {
     if (isset($_SESSION['uc_referer_uri'])) {
@@ -2065,7 +2065,7 @@
 
   // Check the user didn't shamelessly two-time us with another site.
   $referer = parse_url($http_referer);
-  if ($referer['host'] != $_SERVER['SERVER_NAME']) {
+  if ($referer['host'] != $_SERVER['HTTP_HOST']) {
     return FALSE;
   }
 
