Most zoning systems have a procedure for granting variances (exceptions to the zoning rules), usually because of some perceived hardship due to the particular nature of the property in question.
Zoning codes vary by jurisdiction.