As long as the listener is the same distance from the driver and the vent the space between the driver and the vent doesn't matter. But as a general rule we want the frequency response to be constant no matter where the listener is located. Since this is an easy criteria to meet for most systems it seems fair to say that for most speakers the vent placement is not critical. However, there are some other points to consider when selecting the vent location. Such things as midrange leakage from the vent, the possibility of the vent getting blocked in normal use, the available space on the baffle, etc.
Most designers tend to locate their vents on the front baffle close to the woofer.
For most speaker systems I see no reason why the vent should not be located on the rear of the enclosure, and in fact, the midrange leakage from the vent of a rear vented speaker will tend to be less noticeable. For a box of given dimensions, the net internal volume will be decreased by the volume of the vent when the vent is located internally. Where the vent volume is a tiny part of the net internal volume this will not really matter. I doubt that any reasonably sized port would have much of a horn-like effect considering the very low frequencies at which most ports operate. The flared vents I have seen don't come anywhere close to these dimensions.