In this article, B‐spline‐based collocation method is employed to approximate the usual and modified Rosenau‐RLW nonlinear equations. The weighted extended B‐spline (WEB‐spline) is used as the modified form of B‐spline as the usual B‐splines fail to obey the Dirichlet boundary conditions. The WEB method is more general method that allows to discretize the domain into finite number of elements not necessarily start from the boundary points of the domain. Our method omits the linearization process of the nonlinear partial differential equation (PDE). Different cases are discussed by setting the parameter p=2,3,4, and 6 that appears in Rosenau‐RLW equations. The error estimation is calculated, which gives good agreement of the exact solution.