I have an OVH hosted application on http://ovhserver/myapp/
This application is also accessible via http://anyUser.domain.com. I did this by redirecting *.domain.com to http://ovhserver/myapp/
The browser displays the http://[anyUser].domain.com. But when I try to read it using GWT, I’m only getting the real adress (http://ovhserver/myapp/).
[anyUser] is a reference to the active account; If you create an account X, my application would be accessible via http://X.domain.com.
I tryed, in vain, using GWT.getHostPageBaseURL(), Window.Location.getHref() and Window.Location.getPath().
I want to read the “displayed” URL in the browser. How can I do it?
Thank you.
This is not redirection, most likely
anyUser.domain.comloadsovhserver/myappin a frame. You can try using$wnd.top.location.hrefin a JSNI method though I’m not sure you’ll be given access to it (as it’s a cross-origin access).You should really try setting up a true domain/hosting, it doesn’t cost much, and would save you many headaches that framing will doubtlessly create.