Maybe something like this?
header("Location: http://subdomain.domain.tld/index.php?itemid=NNN");
If you want this to work on all pages, you can try this (though I never tried it myself):
header("Location: http://subdomain.".$_SERVER['PHP_SELF']."");
Test the last one first, as I just...