diff --git a/lib/rules/index.js b/lib/rules/index.js
index <HASH>..<HASH> 100644
--- a/lib/rules/index.js
+++ b/lib/rules/index.js
@@ -84,7 +84,7 @@ function getProxy(url, req, callback) {
       if (host.port) {
         matcher = matcher + ':' + host.port;
       }
-      req._phost = parseUrl(util.setProtocol(matcher)).host;
+      req._phost = matcher;
       req.headers[HOST_HEADER] = util.encodeURIComponent(host.rawPattern + ' ' + matcher);
     } else {
       reqRules.host = host;
@@ -101,6 +101,9 @@ function getProxy(url, req, callback) {
     if (!req._phost && P_HOST_RE.test(proxy.matcher)) {
       req._phost = RegExp.$1;
     }
+    if (req._phost) {
+      req._phost = parseUrl(util.setProtocol(req._phost));
+    }
     reqRules.proxy = proxy;
     return callback();
   }
feat: supports to set hosts for proxy