0

How to set a fix ip address to access localhost on iPad?

I use XAMPP on Windows PC but access localhost on iPad. in iPad i need to type http://ip_address_of_my_computer_instead http://localhost

The problem is every-time when I restart the pc ip address of my PC gets changed. and when go to office network it also get changed

for example. some time it's 192.168.1.1 and sometime it will be 192.168.0.102

Can I set a fix ip for my laptop, even I'm at home or Office.

I want to fix the local ip for my pc fix.

1 Answer 1

3

The name "localhost" is an alias to the IP address 127.0.0.1, which is always the local computer. It is not advisable to try to alter this behavior..even if you could.

A static IP address will be problematic as you move your computer from work to home and back again. Each time you go to a new place, you're likely to find that your laptop can't access network resources. Your best bet is to setup a DHCP reservation at home on your router so your computer is set to DHCP, but it will get the same IP address every time. You can ask your network administrator to do the same for you at work. THen, you'll only have to remember two IP addresses to test with depending on where you are.

2
  • 1
    +1 for a DHCP reservation.
    – ceejayoz
    Aug 20, 2011 at 14:08
  • You'll need to find your MAC address to do this. If i can remember correctly it's Settings > General > About > Wi-fi Address.
    – Nixphoe
    Aug 20, 2011 at 14:58

Not the answer you're looking for? Browse other questions tagged .