Wrong path when moving from MAMP multisite to remote website I have different sites in MAMP, each of them being located in ../htdocs/
i.e. ../htdocs/site1, ../htdocs/site2, ../htdocs/site3, etc.
In some page of site1, I have something like   

&lt;ul&gt;
    &lt;li&gt;Petit retour aux sources : comment tout a commencé&lt;/li&gt;
    &lt;li&gt;Le golfe du Morbihan en 2008&lt;/li&gt;
    &lt;li&gt;En 2009, cap sur l'archipel de Glénan&lt;/li&gt;
    &lt;li&gt;Cette année (2010), c'est Bénodet !&lt;/li&gt;
    &lt;li&gt;Et pourquoi pas &lt;a href="/site1/node/2"&gt;Stockholm&lt;/a&gt; en 2011 ?&lt;/li&gt;
    &lt;li&gt;2012, &lt;a href="/site1/node/36"&gt;l'année des cairns&lt;/a&gt; du golfe du Morbihan&lt;/li&gt;
    &lt;li&gt;En 2013, tranquillement sur la Vilaine...&lt;/li&gt;
    &lt;li&gt;Golfe du Morbihan « agayne » en 2014&lt;/li&gt;
    &lt;li&gt;2015 : encore le &lt;a href="/site1/node/50"&gt;Golfe&lt;/a&gt; mais en famille&lt;/li&gt;
&lt;/ul&gt;


Then, I move site1 to web provider and ../htdocs/site1 becomes www (root of the web site).
And, of course, URLs such as "/site1/node/36" don't work anymore :-(
How can I solve that?
It sounds like in MAMP you're using one domain, localhost, instead of three separate domains for three separate codebases.

You should set up three domains in MAMP and then you can use relative urls such as "/node/50" instead of "/site1/node/50".

Then your config would be in /sites/default/settings.php, with an included settings.local.php that is git excluded to use different database credentials between the local and production sites.

Multisite is a different set up.

You wouldn't have three separate codebases, such as "/htdocs/site1", "htdocs/site2" and "htdocs/site3".

You would have one codebase such as "htdocs/mymultisite".

With a non-multisite set up with three separate codebases, you would create three hosts in MAMP and then point each docroot to that site's docroot, for example, "/htdocs/site1", "htdocs/site2" and "htdocs/site3".

For a multisite set up, you would use one codebase (such as "htdocs/mymultisite" and create a sites folder for each domain.  First, you would copy example.sites.php to sites.php in the /sites folder of your repo. Then for each host, you would set up a folder with a separate settings.php, for example:

/sites/site1.local/settings.php
/sites/site2.local/settings.php
/sites/site3.local/settings.php


with the folder name corresponding to the domain set up in MAMP.

(With a non-multisite set up with separate codebases, you can just use the /sites/default/settings.php)

For both separate codebases and hosts in mamp, and for multisite with sites folders, it should work to visit each domain, such as site1.local in your browser, the urls will be relative to that URL.

If you are using multisite, when you want to go to production, you can set up a folder for production.  Set up a folder for production:

/sites/mysite.com/settings.php


There is a lot of information about setting up multisite Drupal.