I have rename htaccess.txt and changed it to .htaccess.
When I visit the site everything is fine (I think). When I turn on rewrite URLs in the back end I get error 500. https://docs.joomla.org/How_to_check_if_mod_rewrite_is_enabled_on_your_server and it works fine, so rewriting works on the server.
Can anyone else think of the issue?