diff --git a/framework/monorailrequest.py b/framework/monorailrequest.py
index 94dd9d6..7fe2918 100644
--- a/framework/monorailrequest.py
+++ b/framework/monorailrequest.py
@@ -16,7 +16,7 @@
 import endpoints
 import logging
 import re
-import urllib
+from six.moves import urllib
 
 import ezt
 import six
@@ -240,8 +240,10 @@
     """
     with self.profiler.Phase('basic parsing'):
       self.request = request
+      self.request_path = request.path
       self.current_page_url = request.url
-      self.current_page_url_encoded = urllib.quote_plus(self.current_page_url)
+      self.current_page_url_encoded = urllib.parse.quote_plus(
+          self.current_page_url)
 
       # Only accept a hostport from the request that looks valid.
       if not _HOSTPORT_RE.match(request.host):
@@ -251,9 +253,8 @@
       logging.info('Request: %s', self.current_page_url)
 
     with self.profiler.Phase('path parsing'):
-      (viewed_user_val, self.project_name,
-       self.hotlist_id, self.hotlist_name) = _ParsePathIdentifiers(
-           self.request.path)
+      (viewed_user_val, self.project_name, self.hotlist_id,
+       self.hotlist_name) = _ParsePathIdentifiers(self.request_path)
       self.viewed_username = _GetViewedEmail(
           viewed_user_val, self.cnxn, services)
     with self.profiler.Phase('qs parsing'):
@@ -296,8 +297,10 @@
     """
     with self.profiler.Phase('basic parsing'):
       self.request = request
+      self.request_path = request.base_url[len(request.host_url) - 1:]
       self.current_page_url = request.url
-      self.current_page_url_encoded = urllib.quote_plus(self.current_page_url)
+      self.current_page_url_encoded = urllib.parse.quote_plus(
+          self.current_page_url)
 
       # Only accept a hostport from the request that looks valid.
       if not _HOSTPORT_RE.match(request.host):
@@ -308,7 +311,7 @@
 
     with self.profiler.Phase('path parsing'):
       (viewed_user_val, self.project_name, self.hotlist_id,
-       self.hotlist_name) = _ParsePathIdentifiers(self.request.url)
+       self.hotlist_name) = _ParsePathIdentifiers(self.request_path)
       self.viewed_username = _GetViewedEmail(
           viewed_user_val, self.cnxn, services)
     with self.profiler.Phase('qs parsing'):
@@ -335,10 +338,10 @@
     prod_debug_allowed = self.perms.HasPerm(
         permissions.VIEW_DEBUG, self.auth.user_id, None)
     self.debug_enabled = (
-        request.args.get('debug') and
+        request.values.get('debug') and
         (settings.local_mode or prod_debug_allowed))
     # temporary option for perf testing on staging instance.
-    if request.args.get('disable_cache'):
+    if request.values.get('disable_cache'):
       if settings.local_mode or 'staging' in request.host:
         self.use_cached_searches = False
 
@@ -597,7 +600,7 @@
     if hasattr(self.request, 'params'):
       value = self.request.params.get(query_param_name)
     else:
-      value = self.request.args.get(query_param_name)
+      value = self.request.values.get(query_param_name)
     assert value is None or isinstance(value, six.text_type)
     using_default = value is None
     if using_default:
@@ -620,7 +623,7 @@
     if hasattr(self.request, 'params'):
       value = self.request.params.get(query_param_name)
     else:
-      value = self.request.args.get(query_param_name)
+      value = self.request.values.get(query_param_name)
     if value is None or value == '':
       return default_value
 
@@ -641,7 +644,7 @@
     if hasattr(self.request, 'params'):
       params = self.request.params.get(query_param_name)
     else:
-      params = self.request.args.get(query_param_name)
+      params = self.request.values.get(query_param_name)
     if params is None:
       return default_value
     if not params:
@@ -665,7 +668,7 @@
     if hasattr(self.request, 'params'):
       value = self.request.params.get(query_param_name)
     else:
-      value = self.request.args.get(query_param_name)
+      value = self.request.values.get(query_param_name)
 
     if value is None:
       return default_value
@@ -698,15 +701,14 @@
     if split_path[0] == 'p':
       project_name = split_path[1]
     if split_path[0] == 'u' or split_path[0] == 'users':
-      viewed_user_val = urllib.unquote(split_path[1])
+      viewed_user_val = urllib.parse.unquote(split_path[1])
       if len(split_path) >= 4 and split_path[2] == 'hotlists':
         try:
-          hotlist_id = int(
-              urllib.unquote(split_path[3].split('.')[0]))
+          hotlist_id = int(urllib.parse.unquote(split_path[3].split('.')[0]))
         except ValueError:
           raw_last_path = (split_path[3][:-3] if
                         split_path[3].endswith('.do') else split_path[3])
-          last_path = urllib.unquote(raw_last_path)
+          last_path = urllib.parse.unquote(raw_last_path)
           match = framework_bizobj.RE_HOTLIST_NAME.match(
               last_path)
           if not match:
@@ -716,7 +718,7 @@
             hotlist_name = last_path.lower()
 
     if split_path[0] == 'g':
-      viewed_user_val = urllib.unquote(split_path[1])
+      viewed_user_val = urllib.parse.unquote(split_path[1])
 
   return viewed_user_val, project_name, hotlist_id, hotlist_name
 
