I handle this four common ways. First, I don't believe my campaign should EVER be 'on rails' - at any stage. I deliberately set up my encounters so players have at least two, but almost always three, options that are plausible given the plot. Each of those options - I follow Jamison and call them 'Challenges' - has at least TWO different ways that get the PC "out" of the challenge.
Given that means there are 4-6 possible outcomes every time the PC face a significant choice, and given that players often stubbornly follow their own path anyway*, that seems like a lot of possibilites.
METHOD #1 (most common, keeping in mind your problem is specifically cities): I bound all the possibilities in a single neighborhood in the city. The PC still CAN go outside the nabe, they just won't find anything useful to the problem they are facing.
METHOD #2: Bound the possibilities in two areas of the city, with transit between them by highly restricted routes (you CAN get from A to B via the Warrens, but that nest of twisting streets is unknown to PC...likely to delay them 2x or 3x as long as the main route...and full of dangers of its own). Then have buildings only for the two nabes, each smaller than the nabe in Method #1.
METHOD #3: All the Challenges lead to secret tunnels, or portals, or other things, which have termini in distant locations within the city...but each location is somehow bounded.
METHOD #4: I often use a large city map, withy every building indicated, and simply build the building/s that the PC choose to go to. If encounters happen en route, I just build those buildings. This takes a little longer, but not a lot. I find having time to think while I build often makes play better.
If no combat is likely to be involved, I may roleplay without a structure for things like encounter in a store.
*Off topic, so skip if you like. For example, when my oldest campaign (7 years) hit a tough challenge....the PC mostly had special powers drawn from a previous encounter with sheglien (if you really care, yes, drawn from the Birthright series, see http://www.birthright.net/forums/showth ... wnsheglien
). They were in a very risky raid on a major awnsheglien's castle/stronghold. Unfortunately Major Awnsheglien showed up unexpectedly - not a bad roll, I had preplanned his itinterary long before the PC decided to raid the castle! I expected them to die, or kill him - like that. But no. Instead, they inveigled a talk with him, and one PC (high Rank assasin, essentially) killed him with a Blood Blade - thus inheriting Major Awhsheglien's Domain, which happened to be stragetically important. But PC #2 got the blade and killed PC #1...but had a complete lifesaving strategy on hand, so PC#1 did not die, he just lost the Domain to PC#2. So after 6 years of play, all the other PC dumped PC#2!!!
That was not in my plot book.
The Chief Least Weasel of Valoria
Totus KS Delenda Sunt, except KS 5