If you have a virtual host proxy for your mediawiki instance, you can override www.stanford.edu as the base url of the server by adding this line to your LocalSettings.php.
$wgServer = "http://[your virtual host name].stanford.edu";
If your virtual host URL points directly to your wiki directory, you will also want to be sure that the script path is set to nothing:
$wgScriptPath = "";
I don't know if this is the final solution, but it has worked for me so far.