sneskid Posted May 8, 2007 Share Posted May 8, 2007 I'm trying to write a script that can connect to a domain using it's IP address. But I'm dealing with a multi-domain server, so the IP address needs an additional string describing which domain I want to access. I've seen it done before but forgot the syntax. It's an apache server with cPanel. Help? Thanks. Link to comment https://forums.phpfreaks.com/topic/50540-access-domain-via-ip-in-multi-domain-server/ Share on other sites More sharing options...
Lumio Posted May 8, 2007 Share Posted May 8, 2007 Your code? GET / HTTP/1.1 Host: I.P. [code] [/code] Link to comment https://forums.phpfreaks.com/topic/50540-access-domain-via-ip-in-multi-domain-server/#findComment-248334 Share on other sites More sharing options...
sneskid Posted May 9, 2007 Author Share Posted May 9, 2007 don't worry about the code, it's the url syntax that im asking about. Say you ping "www.electionsites.ca" from the command prompt in windows. you'll get a reply from 74.52.10.226. Now if you use a browser to visit "http://74.52.10.226" you will see a cPanel screen not electionsites.ca, because the server hosts more than one domain. my question is how to access the site using the ip syntax. Something like "http://74.52.10.226/electionsites/"? Link to comment https://forums.phpfreaks.com/topic/50540-access-domain-via-ip-in-multi-domain-server/#findComment-248705 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.