I am trying to use domain masking to simulate multi-tenant access to my application. The plan right now is to read the subdomain portion of the domain ie: demo.mydomain.com and load settings from the DB using that name.
The issue I’m having is that request.url is getting the request url – NOT the url in the browser.
So if I have http://demo.mydomain.com forwarding to http://www.mydomain.com/controllername with masking, request.url is grabbing the latter, simply because of how masking works, i assume – by putting the masked site inside of a frame.
Is it even possible to read the url in the browsers address bar? Thanks.
You probably can get the url you want, but at the client side…
So, do this:
window.location.href.Cons:
Pros: