--- path_access/path_access.module	2009-12-27 03:23:56.000000000 +0600
+++ /home/kishvar/www/drupal/sites/all/modules/path_access/path_access.module	2011-01-11 11:19:10.706384166 +0600
@@ -47,20 +47,25 @@ function path_access_init() {
     $pages .= $role->pages . "\n";
     $visibility = $role->visibility && $visibility;
   }
+  //var_dump($visibility);
   $visibility = ($visibility > 0) ? TRUE : FALSE;
 
+  
   // Match path if necessary.
+
   if ($pages) {
     // The current page.
-    $path = drupal_get_path_alias(check_plain($_GET['q']));
+    global $base_root;
+    $path = $base_root . request_uri();//drupal_get_path_alias(check_plain($_GET['q']));
 
     $regexp = '/^(' . preg_replace(array('/(\r\n?|\n)/', '/\\\\\*/', '/(^|\|)\\\\<front\\\\>($|\|)/'), array('|', '.*', '\1' . variable_get('site_frontpage', 'node') . '\2'), preg_quote($pages, '/')) . ')$/';
+    
     $page_match = ($visibility xor preg_match($regexp, $path));
+    
   }
   else {
     $page_match = FALSE;
   }
-
   // Check that the current page is not a protected page before blocking user.
   if ($page_match && !path_access_protected_pages($path)) {
     drupal_access_denied();
