Where you place a vent in a speaker often depends on the frequency the vent is tuned to and the size of that vent.
This is one of those topics, where the correct answer is "it depends". Almost every design choice you make with speakers has to be seen from a global perspective of how it effects all the other elements in that design.
We can make some statements that are generally correct.
A vent will have it's own sonic signature and if severe enough may warrant placing the vent far away from the listener where it will do the least harm. If, however; you have a large port, there can be some charm to getting it close to its associated driver from an integration point of view. The large port size will minimize the "huffing" and "chuffing" that some disigners try to mask, by placing a overly small port on the back of a speaker cabinet.
Getting the port off the back may also allow for greater latitude in speaker placement. For example, a small rear vented mini-monitor with otherwise quite acceptable sonics, can sound awful when placed in a bookcase or near a wall.
These are just some generalizations, the "where" of a port must be part of an overall design exercise and not an afterthought.
Front, back, side, top, it doesn't matter as far as tuning is concerned; as long as the vent can physically fit in the space. A cabinet tuned to 20Hz, stays tuned to 20 Hz regardless of vent placement.
Good rules to follow are; keep the interior outlet atleast the diameter of the port away from any of the interior surfaces. Keeping the vent away from the high frequency drivers, and in close proximity to the low frequency drivers is always good practice.
Properly designed and executed ports are inaudible from the woofer at any distance beyond nearfield.
At a 3m (approx 9+ ft) distance from the rear wall, you won't hear much if any difference between a front or rear mounted port; particularly if your talking about a sub. If possible put the port on the front baffle board, if that's not convenient rear mounting is fine.