This can be done in a couple different ways. The most obvious way is to keep the module in transparent mode (factory settings) and set up the module using AT command.
It involves the following steps:
1) set up your module so it connects to a router, such as SSID, security, passkey
2) set up your module so it will connect to the web server address and port, and indicate TCP connection
3) simply send out an HTTP GET header to the xbee's serial port and wait for response.
Now, before I type something in detail, do you know how to use AT commands on xbee modules?