The San Francisco Rent Ordinance Rules and Regulations contain a section regarding a clause in a rental contract against subletting. If your lease contains such a clause, it is still possible to sublet. Nevertheless, some rules must be followed.
For agreements made after 1998, the violation of a prohibition against subletting can be a ground for eviction. However, the prohibition must be adequately disclosed and agreed to by the tenant at the beginning of the lease. “Adequate disclosure” means that the prohibition against subletting is set out in bold type. The tenant must separately initial the prohibition. If this is not done, then the landlord must provide the tenant with a written explanation of the meaning of the prohibition, either in the contract or in a separate document.
On the other hand, if the lease specifies a certain number of tenants, then the replacement of one of the tenants will not constitute a violation of the lease under certain conditions. Likewise if the tenant makes a written request to the landlord for permission for a new subtenant and the landlord fails to respond within 14 days, then the subtenant is considered to be approved under the Rent Ordinance.
You should consult with a tenant attorney before subletting if your lease contains a prohibition against subletting.