Jump to content

Redirecting a url to my server locally


tibberous

Recommended Posts

I have a domain that I want to point to my local server, so if I type in www.ebay.com, it doesn't go there, but to my apache server.

 

I tried doing this in windows hosts file, added the line:

 

127.0.0.1 www.ebay.com

 

But it just didn't work. I'm not sure what else to try, and was pretty sure that way worked - didn't do anything period.

 

Does anyone know anything else to try?

Link to comment
https://forums.phpfreaks.com/topic/71395-redirecting-a-url-to-my-server-locally/
Share on other sites

The hosts file is sort of annoying... This will work, or at least it did in my tests on Windows XP:

 

Be sure it is this file: C:\windows\system32\drivers\etc\hosts

No extension.

 

Add this to the end:

127.0.0.1       ebay.com
127.0.0.1       www.ebay.com

 

That works. Ebay IS a perfect example of a weakness of HOSTS: Type in one of the many Ebay subdomains, such as computers.ebay.com, and you are not sent to your apache server, you are sent to Ebay. However, some images and files may not be able to load. Other than that, this works.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.