Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Redirect a website to another?

Posted on 2011-10-11
16
Medium Priority
?
302 Views
Last Modified: 2012-05-12
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.
0
Comment
Question by:rdabate
  • 5
  • 4
  • 3
  • +2
15 Comments
 
LVL 34

Expert Comment

by:Paul MacDonald
ID: 36951657
Use DNS to point www.google.com to the IP address of the "local PC that is not part of a domain."
0
 

Author Comment

by:rdabate
ID: 36951761
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.  
0
 
LVL 6

Expert Comment

by:CanusRufus
ID: 36951776
Add the entry into he HOST and LMHOST files.
C:\Windows\System32\drivers\etc

http://support.microsoft.com/kb/105997
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:rdabate
ID: 36951821
I tried modifying both the host and lmhost file.  But nothing is getting redirected.  Do I need to restart any services for this?
0
 
LVL 34

Expert Comment

by:Paul MacDonald
ID: 36951880
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.
0
 

Author Comment

by:rdabate
ID: 36951902
No web server or any of that .  Pretend this is your parents computer.  No domain, no web server, it's a stand alone PC.
0
 
LVL 12

Expert Comment

by:ryan80
ID: 36951957
as CanusRufus said, edit the host file. This should work for you. I would go back and double check your steps you took.
0
 
LVL 34

Expert Comment

by:Paul MacDonald
ID: 36951974
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).
0
 
LVL 12

Expert Comment

by:ryan80
ID: 36951987
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.
0
 

Author Comment

by:rdabate
ID: 36952075
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.
0
 
LVL 12

Accepted Solution

by:
ryan80 earned 336 total points
ID: 36952087
You will only be able to redirect it to another IP address, not a URL with the host file.
0
 

Author Comment

by:rdabate
ID: 36952125
ryan80

Ah!!!!

This may be my issue.  
0
 
LVL 34

Assisted Solution

by:Paul MacDonald
Paul MacDonald earned 332 total points
ID: 36955489
Yes - the format for the hosts file is
IP Address <tab> hostname
0
 
LVL 6

Assisted Solution

by:CanusRufus
CanusRufus earned 332 total points
ID: 36955984
In a nutshell yes you have to resolve the IP address to a Host name and vice versa. The Host file is where you need to focus on and even if you are connected a DNS server to Web server, it'll look at this file and take what is here over those servers to the local machine.

A lot of agencies will hide web site with this method. Not post a public DNS for it and force you to add an entry into this file. It helps to keep it secure.

You want to resolve www.google.com to an IP of your choosing. This way when they type in www.google.com it'll resolve to another IP of your choosing.  The problem with a site like Google is that it has many parts and sub parts so I am unsure if all the innards of Google will be directed as well.
0
 
LVL 59

Expert Comment

by:LeeTutor
ID: 37112783
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

First some basics on Windows 7 Backup.  It has 2 components one is a file based backup which is stored in .zip files each zip is split at around 200 Megabytes and there is the Image Backup which is as the name implies a total image of the partition …
On some Windows 7 (SP1) computers, Windows Update becomes super slow even the computer is reasonably fast.  There's one solution that seemed to have worked well for me (after trying a few other suggested solutions).
In this Micro Tutorial viewers will learn how to use Boot Corrector from Paragon Rescue Kit Free to identify and fix the boot problems of Windows 7/8/2012R2 etc. As an example is used Windows 2012R2 which lost its active partition flag (often happen…
This Micro Tutorial will give you a introduction in two parts how to utilize Windows Live Movie Maker to its maximum editing capability. This will be demonstrated using Windows Live Movie Maker on Windows 7 operating system.
Suggested Courses

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question