improve link building (QUERY_STRING and PATH_INFO are now allowed)