Thanks Sambol for your answer! You were right, I changed the permalinks mode from custom structure to default and the internal links are working now. Bad thing is that now I have the ugly code on my urls.
BTW, when the custom structure was enabled I had an extra note beside the save changes button:
If your .htaccess file were writable, we could do this automatically, but it isn’t so these are the mod_rewrite rules you should have in your .htaccess file. Click in the field and press CTRL + a to select all.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
——
I have other blogs with custom permalinks that work just fine and that note is not there. So maybe that has something to do with the problem?
Thanks again