HTTPSOCKET.Get vs. different domain names - Redirect?

I have a configuration file on my web site that my desktop retrieves using a HTTPSOCKET, like this:

MySocket.Get(“http://www.mckernon.com/myconfigfile”)

This works perfectly, I get the contents of myconfigfile.

I have another domain name (lightwright.com) that points to the exact same IP address as mckernon.com.

MySocket.Get(“http://www.lightwright.com/myconfigfile”)

With this domain name, I get an error 404, page not found.

Both domain names resolve to the same IP address, why would there be a difference in results?

I think it has something to do with lightwright.com being redirected to mckernon.com, but I don’t know how to deal with that in Xojo…

I’d almost have expected that the get initially gets an HTTP redirect response and you’re not handling that

ah

dim s as string = MySocket.Get(“http://www.lightwright.com/”, 900)

shows the moved response

but going tohttp://www.lightwright.com/myconfigfile is NOT redirected - so you get a 404

If you check it in your browser, you’ll get a 404 also.
There’s nothing Xojo can do for you there.

If both domains are pointing to the same IP, then your Apache is redirecting / but not the file. Either fix Apache so it redirects the requests for the file to the right location or (better yet) if both domains should show the same, configure Apache so that both hosts use the same directory.

Thanks Norman and Marco, it should be an easy fix!