Inverse kinematics of redundant robots presents a challenging problem for real-time applications due to the lack of uniqueness of solution and the low computational efficiency caused by redundancy and hard limits. In this work, a general and efficient method for addressing the real-time optimized inverse kinematics of redundant robots is proposed, taking into account hard limits in joint and Cartesian space that can never be violated. The proposed method proceeds by using constrained linear programming instead of quadratic programming to solve the inverse kinematic problem. Various hard limits such as joint range, bounds on velocity and acceleration are handled explicitly as inequality constraints. This method resolves the redundancy in real-time and enable to simultaneously guarantee that the additional motion constraints will never be violated. Its performance allows real-time kinematic control of redundant robots executing sensor-driven online tasks. The effectiveness of this method is demonstrated through simulations and experiments conducted on a 7-DOF KUKA IIWA robot, showcasing its ability to control redundant robots executing sensor-driven tasks in dynamic environments with numerous hard limits.