We study disease spread on a social network where individuals adjust contacts to avoid infection. Susceptible individuals rewire links from infectious individuals to other susceptibles, reducing infections and causing the disease to only become endemic at higher infection rates. We formulate the planner’s problem of implementing targeted lockdowns to control endemic disease as a semidefinite program that is computationally tractable even with many groups. Rewiring complements policy by allowing more intergroup contact as the rewiring rate increases. We apply our model to compute optimal spatially-targeted lockdowns for the Netherlands during Covid-19 using a population-level contact network for 17.26 million individuals. Our findings indicate that, with rewiring, a targeted lockdown policy permits 12% more contacts compared to one without rewiring, underscoring the significance of accounting for network endogeneity in effective policy design.