A sublease by a tenant without written consent of the landlord is a nullity insofar as the rights of the landlord are concerned, except that rent collected by a tenant from a subtenant shall be deemed to be held in trust by the tenant for the benefit of the landlord until the payment of the landlord’s claim for rent. But when the premises have been sublet the sublessor, as between himself and the subtenant or sublessee, shall be deemed the landlord and the sublessee the tenant under him and the provisions of Chapters 33 through 37, § 27-39-10 and Article 3 of Chapter 39 of this Title, other than Sections 27-35-80, 27-35-170 and 27-35-180, 27-39-280 and 27-39-300 shall apply to sublessors and sublessees, as between themselves, as in other cases of landlord and tenant.