Your Domain Name in XAMPP

This probably applies to many other things while working with XAMPP or any webserver on your machine, but I specifically used it when using AJAX. Just determine your LAN/local/internal ip address and use that ip address as your domain name. For example, if this is what you had on another webserver,

var myDomain = "www.domainName.com/location/"; //where your proxy file is placed
var proxy_name = "phpProxy.php";  //proxy's filename
var actualReq = "http://search.yahoo.com/blablabla?=...." //actual request
var url = "http://"+myDomain+proxy_name+"/?"+actualReq;
httpRequest("GET",url,true,handleResponse);
...

and your local ip for example is 192.168.123.321, replace

www.domainName.com/

with

192.168.123.321/

Also, when you call the file from your browser, instead of using “http://localhost/….”, use “http://192.168.123.321/….” instead.

Happy XAMPPing!

Advertisements

One Response to “Your Domain Name in XAMPP”

  1. shufi Says:

    hye. i would like to ask. how can i propagate my domain name to my pc that running xampp as a server with windows server 2003?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: