How can I grab the masked URL in PHP from the htaccess? I have already tried HTTP_HOST, REQUEST_URI and SERVER_NAME but it always returns .com when I am trying to grab the masked url being .nl in this instance. HTTP_REFERER is not reliable and doesn't always have anything to refer from.
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www\.)?domain\.nl [NC]
RewriteRule ^(.*) http://domain.com/$1 [P]