Migrating Drupal 8 site from root to sub directory

I am trying to move a Drupal site from www.example.com to www.example2.com/subdir, i.e. changing the host and installing in a subdirectory of the new host.  I have moved the database to example2 using mysqldump and the files using rsync.  I haven’t changed anything in the database or files (e.g. I have not modified the .htaccess or settings.php files).  When I browse to www.example2.com/subdir I see the site’s front page, but with all images broken, and all the buttons to other pages on the site are missing the directory name.  For example, what should be a link to http://www.example2.com/subdir/sites/default/files/inline-images/image1.png is actually linked to http://www.example2.com/sites/default/files/inline-images/image1.png and so the image is not displayed.

This only happens on the front page – all the other pages are fine.  I have cleared the site cache.  I am mystified about what might be causing this – any suggestions?

Drupal version: 

Source: https://www.drupal.org/taxonomy/term/1/feed