GOT IT!
It’s ugly but it works. To get rid of the redundant subdomain, just subtract that part of the $index and $qstr strings that is giving the problems.
To see what they originally were getting, I ran a trace script on the $_SERVER calls in the get_pagenum_link function:
<?php
echo $_SERVER['REQUEST_URI'];
echo $_SERVER['PHP_SELF'];
?>
This gave the orginating file as well as the subdomain. BINGO!
Thus to lines 377 to 398 of template_functions_links.php, I added a substr php command to excise this problematic subdomain:
$qstr = wp_specialchars($_SERVER['REQUEST_URI']);
$qstr = substr ($qstr, 8);
...
$index = $_SERVER['PHP_SELF'];
$index = substr ($index, 6);
The discrepancy in the substr calls are because I am getting %7E in $qstr, two characters more than the regular single ~ in $index.
Thus in general, for $qstr, the number should be the length of subdomain name + 4, and for $index it should be +2.
This seems to have cleared up other 404 errors originating from the login as well as all instances of previous/next entries misdirection.