Yes, courts can reject a writ petition to enforce a right that is provided under a statute or law and the statute prescribes a remedy or procedure for enforcing the right. In such cases, the court can refuse to entertain the writ petition and direct the person to seek a remedy under the particular statute or law only.