Redirect to another site in the same server?

April 12, 2011 at 21:20:54
Specs: Windows XP
How do I redirect the visits to a specific homepage (web site) to access a "sub" page in the same domain? Is it possible to use the Hosts file to do this? I want redirect visits to www.whatever.com to ok.whatever.com.

See More: Redirect to another site in the same server?

Report •

#1
April 13, 2011 at 08:06:05
Um just reassign the IP for ok.whatever.com to www.whatever.com in the host file. Not sure what you are asking. By the way this is not a good thing to do and some antiviruses will flag this action. Why are you trying to do this?

I think the best place to do this would be in your DNS server. Just modify the Host record for www.whatever.com to the new IP this way you do not need to modify everyone's host file.


Report •

#2
April 18, 2011 at 10:21:51
Thanks for your reply ACE_Omega. The idea is to block the homepage of a site but there is an "internal" page that I want the users to go instead of the homepage. I don't control the DNS and I just have Admin access to the 3 machines I want to do the change. What I want is to have these 3 PCs to access "CompanyX.JobsPostingSite.com" every time they look for the homepage "www.JobsPostingSite.com", without being dependent of what web browser they use (machines have Firefox, IE, and Chrome installed). Both pages are in the same server (same IP address).

Report •

#3
April 18, 2011 at 14:00:37
Have you tried using the HOST file yet? Just enter...

68.168.84.192 CompanyX.JobsPostingSite.com #Johosting redirect

In the host file. I usually only use the host file for black lists. I do thing like this through the DNS.


Report •

Related Solutions

#4
April 20, 2011 at 11:15:58
Yes, the problem is the IP address is the same and when the user types the homepage will get it instead of being redirected to the specific page I want.
I think is not possible with Hosts file because the Browser sends the URL page requested (homepage) in the packet, so the Web Server will send back the specific page.

Report •

#5
April 21, 2011 at 10:36:28
Wait that is impossible for them to share the same IP. You need to talk to your DNS person and get the host files fixed.

Report •

Ask Question