web url

From session.open event, how can I get the url parts ( like google.com) ? On Java script we have the following commands:
window.location.protocol = “http”
window.location.host = “google.com

On Xojo ?


On the sever side, you can’t because it’s an HTTP 1.0 server. But you could write a custom control to get that information from the browser and send it to you.

I made some tests and I found that If you execute the following code on session.open event, you can take the URL.
code : dim host as String = self.Header ( “Host” )

So, from session.open event, I can to redirect to any page according to incoming url information. This is good to host on the same server, a lot of different applications under the same project and on the same server port.