Imposing rigidity constraints of an immersed elastic body in a transient flow field is not trivial. It requires solution stability and accuracy. In this paper, we present an efficient and accurate algorithm implemented to enforce fluid-structure interface constraints used in the immersed finite element method (IFEM). This interface treatment is a constraint applied onto the rigid bodies based on the fluid structure interaction force evaluated from the immersed solid object. It requires no ad hoc constants or adjustments, thus providing numerical stability and avoiding unnecessary trialand-error procedures in defining the stiffness of the elastic body. This force term can be evaluated for both uniform and nonuniform fluid grids based on the higher order interpolation function adopted in the IFEM. The ability in handling nonuniform interpolations offers the convenience in modeling arbitrary geometrical shapes and provides solution refinements around interfaces. The results we obtained from flow past a rigid cylinder demonstrate that this convenient way of constraining the interface is a reliable and robust numerical approach to solve unsteady fluid flow interacting with immersed rigid bodies.