Hi,
you cannot reproduce the problem because, as I wrote in the edit of my last post, I solved the problem restoring the backup of my website of some days ago.
Making a folder comparison of the "bad" and "new" website version, I found that the reason of the issue was the presence of these instructions in the .htaccess:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/$1 [L]
I had added them to cut the index.php at the end of the urls, because this was creating some routing errors in special circumstances, but in this way I have basically broken my website. I have learnt the lesson, that I need to make a non-regression test list at every change.
Sorry for the time I had made you spent on this topic. I hope that learning from my mistake can be useful to other developers.