I have tried this
<li class=""><a href="<?php $server = $_SERVER['HOST'] .'/metro';echo $server;?>" target="_self" class="">Home</a></li>
That would work, except for the fact that $_SERVER["HOST"]
—unless you created it yourself— doesn’t exist. I would suspect you’re thinking of $_SERVER["HTTP_HOST"]
?
A better solution might be to define a constant: for example, if the above gives you the correct value:
define( "MY_ROOT_URL",$_SERVER["HTTP_HOST"]."/metro" );
then,
<a href="<?= MY_ROOT_URL ?>">Home</a>