Subletting an apartment is tricky. The laws are different from state to state, but one thing is true in all states; even if you sublet a property, the person's name on the lease always remains responsible for the property. Think carefully before you decide to to this and make sure you have references and a credit report from the person you choose to sublet to. The next step is to get the landlord's permission, in writing, to sublet. Do not ever make a verbal agreement. Have everything in writing from the Landlord and from the person to whom you sublet. Any damage, or problems which could occur during the period you are out of the apartment can still be held against your original lease.
Finally, most lease agreements have a sublet clause in them so be sure to read your original lease carefully. The landlord may have the right to increase the amount of the original deposit, or refuse to sign an agreement to approve a sublet.
Hope this information is helpful