Link to home
Start Free TrialLog in
Avatar of rdabate
rdabate

asked on

Redirect a website to another?

I'm testing some applications for a client.  I need to simulate a few things.

How can easily redirect a website to another on a local PC that is not part of a domain?

For example, if a user tries to go to www.google.com, I want them to be redirected in the background to something else with them seeing this.

Suggestions?  

Thanks.
Avatar of Paul MacDonald
Paul MacDonald
Flag of United States of America image

Use DNS to point www.google.com to the IP address of the "local PC that is not part of a domain."
Avatar of rdabate
rdabate

ASKER

I'm not following you on that?  Where on the local pc would I do that?  

What I need to do is have a person type in something like www.google.com and be redirected to another site that I specify.  
Add the entry into he HOST and LMHOST files.
C:\Windows\System32\drivers\etc

http://support.microsoft.com/kb/105997
Avatar of rdabate

ASKER

I tried modifying both the host and lmhost file.  But nothing is getting redirected.  Do I need to restart any services for this?
Do you want this redirection to take place on one machine or for anyone who tries to go to the original site?

If you have a web server at www.google.com and you want everyone to see something other than what that server is serving up, you'd want to change DNS to point www.google.com to another IP address/machine.

If you have a web server at www.google.com and you want people using a testbed machineto see something other than what that server is serving up, you'd want to change the testbed's hosts file to point www.google.com to another IP address/machine.
Avatar of rdabate

ASKER

No web server or any of that .  Pretend this is your parents computer.  No domain, no web server, it's a stand alone PC.
as CanusRufus said, edit the host file. This should work for you. I would go back and double check your steps you took.
Okay, but the PC has to have a web server on it in order to see a web site! That is, something has to serve the web site up (thus a web server).
this is correct. And the server that it is sent to also has to accept connections by IP address or if it looks at the URL it has to accept it for the URL specified, in this example google.com.
Avatar of rdabate

ASKER

I'm sure where the disconnect is.  Let me explain again.

No web server.  Pretend this is a friends or family member's computer.  Stand alone.

As an example,
I need a user to type in www.google.com and be redirected to www.yahoo.com 

I tried editing the host files but nothing is being redirected.
ASKER CERTIFIED SOLUTION
Avatar of ryan80
ryan80

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rdabate

ASKER

ryan80

Ah!!!!

This may be my issue.  
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.