chage paginate.href(req) to use .originalUrl instead of url