tibberous Posted October 1, 2007 Share Posted October 1, 2007 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? Quote Link to comment https://forums.phpfreaks.com/topic/71395-redirecting-a-url-to-my-server-locally/ Share on other sites More sharing options...
sKunKbad Posted October 1, 2007 Share Posted October 1, 2007 Can you be more clear as to what you want to do. Quote Link to comment https://forums.phpfreaks.com/topic/71395-redirecting-a-url-to-my-server-locally/#findComment-359341 Share on other sites More sharing options...
sljaxon Posted October 1, 2007 Share Posted October 1, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/71395-redirecting-a-url-to-my-server-locally/#findComment-359516 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.