Jump to content

Changing localhost to ip


30ml

Recommended Posts

hi currently i am developing for mobile device . I have android phone which can browser computer server but I could not access prestashop because all the files are pointed with "localhost". Now I want to change localhost to IP Address. Is it possible to do.

 

Your interest are fully appriciate.

 

Regards

Link to comment
Share on other sites

  • 1 month later...

OK, so I suppose you've got wifi router and your computer is connected by cable or wireless. If so your machine already has own IP like 192.168....In Windows go to Start>Run write cmd and OK. Write ipconfig and enter, now you can see your connection settings and your IP address.

By the way, localhost is equal IP address 127.0.0.1 but you can't use it on remote computer.

Check also if there is http port 80 opened in your computer and it isn't blocked by any firewall.

 

If you have any questions let me know.

Link to comment
Share on other sites

OK, so I suppose you've got wifi router and your computer is connected by cable or wireless. If so your machine already has own IP like 192.168....In Windows go to Start>Run write cmd and OK. Write ipconfig and enter, now you can see your connection settings and your IP address.

By the way, localhost is equal IP address 127.0.0.1 but you can't use it on remote computer.

Check also if there is http port 80 opened in your computer and it isn't blocked by any firewall.

 

If you have any questions let me know.

 

while I enter on my android mobile with this ip 192.168.1.3, prestashop automatically redirect to http://localhost on 80 port. Currently my PC is my act as server. Why I could not access my computer's localhost ? How could I check through my mobile. I need to test my prestashop on my mobile.

Link to comment
Share on other sites

Hi again,

 

I've just checked it and know what you mean. Go to BO>Preferences>Meta-tags , there you can find your domain information ("localhost") , please delete this and leave empty field. After that it runs on my HTC without redirect to localhost.

  • Like 1
Link to comment
Share on other sites

Hi again,

 

I've just checked it and know what you mean. Go to BO>Preferences>Meta-tags , there you can find your domain information ("localhost") , please delete this and leave empty field. After that it runs on my HTC without redirect to localhost.

 

Hope you may be right, I will try your solution too. Thanks for you kindly reply.

Link to comment
Share on other sites

  • 3 years later...

Hi again,

 

I've just checked it and know what you mean. Go to BO>Preferences>Meta-tags , there you can find your domain information ("localhost") , please delete this and leave empty field. After that it runs on my HTC without redirect to localhost.

 

Oh, I was looking for this. Unfortunately in Prestashop 1.6.0.9 we can't leave it blank, so what we need is IP address of the local server (192.168.X.Y) so that it's accessible for another devices  :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...