How to Redirect Websites With PAC Files
- 1). Click "Start," and double-click "Notepad" to open the HTML editor. Click "File" and "New" to open a new HTML file.
- 2). Type the following code and press "Enter":
function FindProxyForURL(url, host) { - 3). Type the following code and press "Enter":
if (localHostOrDomainIs(host, "proxied.website.com")) {
Replace "proxied.website.com" with the website address for which you want to use the proxy. - 4). Define the proxy by typing the following code and pressing "Enter":
return "PROXY your.proxy.server.com:8080
Replace "your.proxy.server" with your proxy server's address and replace "8080" with the correct port number. - 5). Type the following code to redirect the browser to skip the proxy and go directly to your defined sites and then press "Enter":
} else {
return "DIRECT";
} - 6). Type "}" to close the proxy function and click "File," then "Save As." Name your proxy PAC file and click "Save."