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
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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.