Reputation: 6010
I have been using the following to discover the full url, but it does not detect the subdomain I am calling from.
$current_url = "http://".$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"]."";
echo $current_url;EXIT;
Any advice?
Upvotes: 1
Views: 1573
Reputation: 1531
Tested and works fine for me. Used this code:
<?
$current_url = "http://".$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"]."";
echo $current_url;EXIT;
?>
Upvotes: 1
Reputation: 180014
$_SERVER['HTTP_HOST']
should include the subdomain. Can you link us to an example page?
Upvotes: 1