title: Detecting domain forwarding with masking with JavaScript
body: <p>My domain <code>website.com</code> is forwarded to <code>mysite.com/website</code> with masking (as configured on my godaddy account.)  </p>
  
  <p>I want to determine if the site was accessed via <code>website.com</code> or <code>mysite.com/website</code>. </p>
  
  <p>Unfortunately everything I try returns <code>mysite.com/website</code> even when the url bar contains <code>website.com</code>. 
  Ie. <code>var url = window.location.href</code>
  Always returns <code>mysite.com/website</code> even if the address bar is <code>website.com</code>.  So using JavaScript how can I determine what the actual URL was used to access the page and not the translated url. (Somehow the browser knows this information because it displays it in the address bar but when I do 'view source' I only see the translated URL.)  I only need this to work for IE.</p>