| View previous topic :: View next topic |
| Author |
Message |
bhpianist Cheater
Reputation: 1
Joined: 17 Apr 2010 Posts: 38
|
Posted: Sat Jul 03, 2010 6:18 pm Post subject: Connecting to a website via its IP? |
|
|
| So I'm just wondering, if I get a website's IP address how come most of the time I can't just connect to it? For example, if I try to visit my site through the IP it always gives me a "can't connect" error. ?
|
|
| Back to top |
|
 |
iPromise Grandmaster Cheater
Reputation: -1
Joined: 27 Jun 2009 Posts: 529 Location: Canada
|
Posted: Sun Jul 04, 2010 4:11 pm Post subject: |
|
|
| Thats weird, try using a different browser.
|
|
| Back to top |
|
 |
tombana Master Cheater
Reputation: 2
Joined: 14 Jun 2007 Posts: 456 Location: The Netherlands
|
Posted: Sun Jul 04, 2010 5:34 pm Post subject: |
|
|
| Since different websites may be hosted at a single IP address the host will check the domain name that is sent in the HTTP header to determine which website is being viewed. So that might explain why it will deny "direct connections" to that IP.
|
|
| Back to top |
|
 |
Jani Grandmaster Cheater
Reputation: 2
Joined: 29 Dec 2006 Posts: 804
|
Posted: Mon Jul 05, 2010 11:38 am Post subject: |
|
|
| Yeah, as tombana, the requested website might be written in the HTTP headers. You need to send eg. (which is mandatory IIRC) to get the specific website, if there are multiple sites hosted on the same IP.
|
|
| Back to top |
|
 |
iPromise Grandmaster Cheater
Reputation: -1
Joined: 27 Jun 2009 Posts: 529 Location: Canada
|
Posted: Mon Jul 05, 2010 9:23 pm Post subject: |
|
|
@Jani Usually if there are many hosts on one shared IP address, it is still possible to connect by IP.
For instance, we have IP: 100.600.10.30
Our site name: www.example.com
We connect to www.example.com by doing: 100.600.10.30/~example/. All we do is take the first 7 characters from the site name and add just like the example to get a connection to the site if the IP is shared.
|
|
| Back to top |
|
 |
tombana Master Cheater
Reputation: 2
Joined: 14 Jun 2007 Posts: 456 Location: The Netherlands
|
Posted: Tue Jul 06, 2010 4:24 am Post subject: |
|
|
| iPromise wrote: | @Jani Usually if there are many hosts on one shared IP address, it is still possible to connect by IP.
For instance, we have IP: 100.600.10.30
Our site name: www.example.com
We connect to www.example.com by doing: 100.600.10.30/~example/. All we do is take the first 7 characters from the site name and add just like the example to get a connection to the site if the IP is shared. |
Jani is correct: the 'Host' field in the http headers is mandatory since HTTP/1.1
So the server shouldn't have to show any webpage when the host is not specified. Many servers however will also work without specifying a host field.
|
|
| Back to top |
|
 |
|