0

I'm using XAMPP and I wanted to see what the result is in my android phone locally so I did what is mentioned here and I got the result but because there is a problem in loading js, css, fonts and other public files I couldn't get what the original version is. I opened my browser in my phone and typed: 192.168.42.111 however I want to type mysite.local and get the correct result. BTW it doesn't show the page correctly in windows when I use localhost/mysite but mysite.local.

How can I connect to windows from android device just by typing mysite.local?

EDIT I forgot to mention that I'm using my mobile network to connect to the internet and it is hot-spotted.

kodfire
  • 1,612
  • 3
  • 18
  • 57

1 Answers1

0

It's not possible to use Xampp from a hot-spot.Xampp is a local virtual server an you have to be in the same network.

If you are in the same network, then I would recommend to use the IPv4-Adress.

To get it do the following:

  1. Press Win + R
  2. Type cmd in the command field and click OK
  3. Type in your cmd: ipconfig and press enter

Then you have to search a little bit after IPv4 in the cmd. If you have found it copy the adress and replace localhost (In your app you website) with it.

Jakob
  • 1,858
  • 2
  • 15
  • 26
  • I think you didn't get my point or I couldn't explain it correctly. I have no problem connecting to localhost. However I want to connect with url which is `mysite.local` not `192.168.42.111` because if I use the IP it doesn't load public files like css, js... – kodfire Oct 02 '18 at 08:22
  • You have to change path of css, images, js file because may be default path you used is `localhost` and required path is `mysite.local` – Chirag Savsani Oct 02 '18 at 08:23
  • As I said it's working when I use `mysite.local` but not `localhost/mysite` in my windows and not `192.168.42.111` in my phone – kodfire Oct 02 '18 at 09:05