You were almost right, but thank you very much anyway, because of your post I started to look in the locations in the script.
In config-file there was a basedir-setting, and it was set to /bestand/. That is why it worked when I used /ip/bestand, but not when i used the subdomain, because bestand.url.nl/bestand didn't exist. When I set BASEDIR to '/', it worked fine. (Now for the same reason reversed, the direct IP-call doesn't work anymore, but that is not a problem!)
Thanks!