--- path_redirect.module	2009-10-01 22:01:33.000000000 +0000
+++ path_redirect.module	2009-10-02 16:11:56.000000000 +0000
@@ -163,18 +163,19 @@ function _path_redirect_check() {
     $path = urldecode(request_uri());
     $path = drupal_substr($path, drupal_strlen(base_path()));
     // Remove ($language->language .'/') via preg_replace?
-    $path = _path_redirect_split_path($path);
-    $where[] = "(path = '%s' OR path = '%s')";
-    $args[':path'] = $_GET['q'];
-    $args[':path_query'] = $_GET['q'] .'?'. $path['query'];
+    $where[] = "(path = '%s' OR (path like '%%*' AND '%s' REGEXP path))";
+    $args[':path'] = $path;
+    $args[':path_reg'] = $path;
     $sort[] = 'path DESC';
     //$where[] = "(path_query = '%s' OR path_query = '')";
     //$args[':path_query'] = $path['query'];
     //$sort[] = 'path_query DESC';
   }
   else {
-    $where[] = "path = '%s'";
-    $args[':path'] = $_GET['q'];
+    $path = $_GET['q'];
+    $where[] = "(path = '%s' OR (path like '%%*' AND '%s' REGEXP path))";
+    $args[':path'] = $path;
+    $args[':path_reg'] = $path;
     //$where[] = "path_query = ''";
   }
 
@@ -207,6 +208,11 @@ function _path_redirect_check() {
     else {
       // Perform the redirect.
       unset($_REQUEST['destination']);
+      
+      if ($len = strpos($r->path, '*')) {     
+        $r->redirect = str_replace('*', substr($path, $len), $r->redirect);
+      }
+      
       drupal_goto($r->redirect, $r->query, $r->fragment, $r->type);
     }
   }
