There is a `roundabout` way that you can redirect HTTP requests in version 6.x, but it can get a bit involved if you plan to do alot of redirecting. I have included a guide on how we managed to do this below for you. Maybe this will be a suitable solution until the next version of WinGate is released.
The main function of the WWW Proxy Server in WinGate is to receive "proxy" requests from your client computers and then act on these requests on behalf of the client computer, however there is another function of the WWW Proxy Server that allows you to specify how the Proxy reacts to Server requests aswell. One of the actions that you can specify for a server request is to "redirect" the request to another URL.
Knowing this, all you need to do is fool your client computers into thinking that the Wingate computer is the host for google.com so that the WWW Proxy can pick up the request and redirect it. As long as your client computer has the WinGate computers IP set as it's DNS server, you can do this using the "Hosts" file on your WinGate server.
- Gatekeeper -> System tab -> DNS/WINS Resolver -> DNS
- Click on the Edit button on the lower right hand side of the window
- Add new entries to the hosts file for any URL's that you want to redirect and set the IP address to the WinGate computers internal IP address. e.g.
- Code: Select all
www.google.com 192.168.1.1
google.com 192.168.1.1
- Save and close the hosts file
Wingate will start resolving DNS requests for google.com and
www.google.com as 192.168.1.1, rather than the actual public IP address of google.com. Now you just need to configure the WWW Proxy Server to rredirect these domains to yahoo.com.
- Gatekeeper -> Services tab -> WWW Proxy Server -> Web Server
- Click Add
- Change the action to redirect
- Enter the URL as "www.yahoo.com"
- Goto the hosts tab
- Click Add
- enter "www.google.com"
- Click Add again
- enter "google.com"
- Click OK, then OK.
That should be it. You're client computers will now think that the WinGate computer is hosting google.com and will ask WinGate for the site. WinGate will then receive these requests for google and redirect them to Yahoo.
Note: This may take a while to start working properly because of DNS caching. You can do use the following command in the command prompt to reset the DNS cache of your client computers.
- Code: Select all
"ipconfig /flushdns"