curious30 wrote:but i want change localhost:81/ = localhost/
As Altrea already said, this is impossible, as the default port for http is port 80, what cannot be changed. You must keep in mind, that at first a client puts in an URL in his browser. This happens first, then the browser has to analyze that URL and sends either a DNS request to a DNS Server (in order to translate a domain name into an IP number) and after the browser sends an TCPIP request to that IP including a valid portnumber. If the client specified a port, the browser will use this port, if the client did not specify a port, the browser will take the standard default port for http and that is port 80.
All this happens without any interaction to your server, only after this very first action, the request will be received by your (Xampp) server. As you see, you dont have any chance to tell your server to use a different port, because this port already has been chosen by the remote client (browser). Its simply too late already. Therefore you cannot change anything, this is the way how TCPIP works.