The choice of citing precisely Pisa and Livorno is interesting. I'm going to launch into an examination of the specific and very unique conditions which impacted the Florentine leadership's decisions regarding these two cities. In the instance that these were two totally random examples, just let me know and I can elaborate more on more general Florentine influence and expansionism on the region that we now call Tuscany.
On October 9th 1406 forces of the Republic of Florence entered the city of Pisa. The eponymous Republic was declared extinguished shortly afterwards, ending over two hundred years of antagonism between the two regional powers. Other Tuscan polities, notably Siena, would soon follow suit in the process of Florentine consolidation over the region.
While the Republic of Florence could celebrate the acquisition of a saltwater seaport, there remained the issue of pacifying an economically vibrant (albeit declining) city with a proud ruling class that had social, political, and economic power deeply rooted not only in the region, but in many of the most influential commercial and political centers of Italy and the Mediterranean.
The Florentines were more than aware of the potential difficulties tied to consecrating control over their fallen rival. The immediate consequence of the Florentine entry into Pisa was a restructuring of the citadel and the stationing of a permanent garrison with some 1500 mercenaries. In addition, the florentines decreed the forced relocation of prominent Pisan political leaders to Florence. While these might be expected, and even generous, consequences of a military defeat, this was nonetheless a humiliating outcome in the Italian political system which typically relied on mutual interdependence and recognition in order to assert geographic expansion of a stronger power onto a weaker one (many prominent Pisans would indeed refuse the conditions and relocate to Palermo, where they had longstanding political and commercial ties). The economic consequences of the Florentine domination also contributed to accelerating the city's decline, as Pisa was relegated from an economic hub to a mere stopping-point between Florence and the Mediterranean. To make matters worse, the Republic of Florence's continued warfare with the nearby Republic of Lucca in the first half of the 15th century would also bode ill for Pisa, as the city was taxed heavily in order to subsidize the conflict, and the surrounding countryside was fought over and trampled by both Florentine and Lucchese armies.
Needless to say, what remained of the Pisan leadership in the city as well as the general population was not enthusiastic about these new arrangements. The Pisans would revolt against Floirence in 1430 and again in 1494, the latter time facilitated by Charles VIII's descent into Italy to claim the throne of Naples. Indeed, in 1494 the Pisan leadership was able to play the Republic of Venice and the Duchy of Milan against each other, spurning them to compete for influence in the reborn republic. However, the Pisan resurgence would be short-lived as Milan was ultimately occupied by the French while the Venetians were distracted in the Aegean Sea as tensions flared up with the Ottoman Empire. Ultimately Venetian and Milanese subsidies to the Republic of Pisa dried up, and while the Pisans would manage to hold off the Florentines until 1509, the city would be subject to a harrowing near-constant state of siege, only partially mitigated by the city's increasingly precarious connection to the sea (the Florentines would come up with many ingenious ways to starve out the city, even commissioning Leonardo Da Vinci to draw up a plan to alter the course of the River Arno with the aim to deprive the city of fresh water).
While we might be tempted to draw a comparison with the nearby competitor Genoa, originally Pisa actually had more in common with Venice. At the time, Pisa sat at the mouth of the River Arno on the northern head of a sandy bay about ten miles wide. Historically, the marshy mouth of the Arno had offered multiple inlets and waterways for both seafaring ships and river boats in and around the city walls, but by the 14th century the accumulation of silt drive navigators to prefer landing outside the city, a trend which would benefit the nearby town of Livorno at the southern end of Pisa's bay. Livorno, a satellite and outpost of the Republic, had initially been home to a watchtower and a handful of houses. But as sediment accumulation made docking in Pisa more difficult, Livorno saw its fortunes turn.
In 1305, Pisan authorities converted Livorno's watchtower into a lighthouse. In 1377, following the deterioration of relations between Pisa and Florence, Livorno's watchtower was turned into an imposing fortress guarding the opposite end of the sandy bay on which Pisan merchants landed. To encourage settlement (and increase manpower) in the outpost, the Republic of Pisa began exempting the city's inhabitants from certain taxes. After Malaria broke out in 1392 around Pisa's silting harbor, Livorno was fortified and further enlarged by decree of the Pisan Doge Pietro Gambacorta, consecrating the city as a vital stopping point for Pisan commerce.
Pisa wasn't irrelevant just yet; river traffic up the Arno was still important (conflicts with Florence permitting) and while Livorno's harbor was superior, the surrounding land was sandy and infertile, discouraging migration from Pisa's more prosperous inhabitants who might want to invest in estates rather than cramped urban housing.
It is interesting that when Pisa fell to the Florentines, a Genoese garrison moved quickly to occupy Livorno (the Republic of Genoa, as can be expected of such a longstanding mercantile rival of Pisa, was in cahoots with Florence). The Genoese planned to run Livorno as a commercial outpost, constructing customs offices and expanding the harbor, as well as using the fortress as a convenient watch-post over tuscany. The Florentines ended up paying an enormous sum of gold to the Genoese in order to take control of Livorno in 1421.
The aforementioned Pisan rebellion of 1494-1509 is significant in that it occurred within a time of broad crisis and transformation in Italy. One of the significant results of this period of turbulence is the transformation of the Florentine state as the Medici dynasty proclaimed themselves hereditary rulers. And at the start of the 16th century, the last thing the new Duke Cosimo de' Medici needed was for Pisa to jeopardize his nascent rule by defecting or rebelling. It was settled, then, that the major seaport of the Florentine State would be in Livorno to the detriment of Pisa.
The operation was easier said and done. Livorno was still small and mostly inhabited by sailors and merchants too poor to live in Pisa, which still remained the most prestigious city on the Tuscan coast. Cosimo first had a palace for himself constructed inside the old castle in the typically understated Medici style, while concurrently emitting a decree protecting all Jews from the inquisition should they relocate to Livorno, laying the foundation for the presence of a large Jewish community which would continue to exist up to the modern era. In 1566 Cosimo discouraged merchants from forwarding goods unloaded in Livorno to Pisa by emitting another degree exempting all inventory deposited in Livornese warehouses from taxation. In the 1570's, the architect Bernardo Buontalenti was commissioned by Cosimo's successor Francesco to draw up a grandiose plan to turn Livorno into a well-fortified maritime center poised to make the Duchy of Florence a naval powerhouse.
But in spite of the favored position Livorno enjoyed under the Medici, when the Tensho Embassy arrived from Japan Duke Francesco Medici organized state visits to Pisa and Siena in addition to Florence. Clearly, Pisa was still an important city for the Tuscan state, competing with Siena for the status of "Second City." Indeed, in the 1591 census Livorno counted little over 500 residents, hardly a booming metropolis in spite of continuous political attention and its declining neighbor.
Francesco's successor Federico set out to change this. Between 1591 and 1593 he emitted the "Livornie," a series of privileges bestowed onto Livorno in an attempt to turn the city into a cosmopolitan center of trade. The laws, guaranteeing religious freedom, protection from the inquisition, and amnesty for several religious and political crimes, were specially designed to attract Jews persecuted in Spain. By 1625, the city could counted over 1000 Jews (up from two dozen in 1601) and a total population of 5000. Although the explosion of population created many logistical, sanitary, and infrastructural problems, Duke Federico had managed to turn Livorno into Tuscany's major international trade hub. Indeed, Livorno was the only Italian city not subject to a recession in the 17th century, and a leader in trade with the emergent Atlantic powers (notably with England). But at this point the Italian Renaissance is far behind us.
So in sum, Livorno is an interesting example of a concentrated effort to divert commerce from once center of trade to another. The Florentine's efforts were most certainly not welcomed by the Pisans, who not only resented Florentine domination, but also resented the favored position enjoyed by the nearby Livornese (nevermind that Livorno was largely inhabited by Pisan and Florentine transplants, in addition to a large population of Jewish transplants from Spain).