URL aware query