code: public String makeReplayURI(String datespec, String url) {
  		String replayURI = "";
  		try {
  			if(url.contains(hostPort)) {
  				return url;
  			}
  			URI uri = new URI(url);
  			StringBuilder sb = new StringBuilder(90);
  			sb.append("http://");
  			sb.append(datespec).append(".");
  			sb.append(uri.getHost()).append(".");
  			sb.append(hostPort);
  			sb.append(uri.getPath());
  			String query = uri.getQuery();
  			if(query != null && query.length() > 0) {
  				sb.append("?").append(query);
  			}
  			replayURI = sb.toString();
  
  		} catch (URISyntaxException e) {
  			e.printStackTrace();
  		}
  		return replayURI;
  	}
docs: /* (non-Javadoc)
  @see org.archive.wayback.ResultURIConverter#makeReplayURI(java.lang.String, java.lang.String)