public static String removePrefix(String listenHostname, String hostname, boolean forward) {
		
		if(hostname == null || listenHostname == null) {
			return null;
		}
		
		listenHostname = listenHostname.trim();
		hostname = hostname.trim();

		if(hostname.startsWith(listenHostname)) {
			hostname = hostname.substring(listenHostname.length());
			hostname = hostname.trim();
		} else {
			return forward?null:hostname;
		}
		
		if(hostname.startsWith(",")) {
			hostname = hostname.substring(1);
			hostname = hostname.trim();
		}  else {
			return null;
		}
		
		return hostname;
	}