0

Here is my particular setup:

-I have a local server with WiFi connectivity.

-It can act as an AP or Client, simultaneously.

-To connect from my iPhone in AP mode, I have to choose it's WiFi Network ( and disconnect the iPhone from my home internet connection) and type an iP 192.168.4.1

What I would like to do is:

-Keep my iphone connected to my home internet network.

-visit www.mydomain.com/local

-be redirected to my local server

Note that I don't want to mess with my router (current solution), and I want to access from any type of device.

Is this even possible ?

1 Answers1

0

Do you really need this?

You can access a machine by its hostname. Here's a whole list of alternative techniques

If you want to do this, this is a way:

In short: You will need to setup a DNS server, which will tell your iphone where to find a certain domain (e.g. mydomain.com). You will tell your iPhone to use your own DNS server on your home network. When on your local network, your iphone will take you to your local server.

  1. Setting up a DNS server We don't have much information on your server, but you'll have to install a DNS server. A commonly used server is bind. In this server's config, you need to create a zone and add DNS records for your server. Please note: I would advise against putting a .com in a local network. Just name your server "localdomain.localserver" or "localdomain.dev" or whatever you want, but prevent using TLDs which are already in use. This way you prevent trouble later on, when you can't visit the 'real' site for a domain you added in your local network.

  2. You need to tell your iPhone to use your own DNS server. You can easily find how to do this.

  3. Only redirecting a specific path. If you want to view mydomain.com on the internet (as usual), but you want mydomain.com/local to take you to your own domain, you can setup a redirect from mydomain.com/local to, for example, mydomain.dev (or whatever local name you have defined). This redirect will only work on your local network.

Bertware
  • 246