Solved

How do I set up a .pac file to use a proxy server and if not available go direct.

Posted on 2010-09-07
2
763 Views
Last Modified: 2013-11-19
We currently are using a proxy and also using a secondary DSL connection for failover. The last piece of the puzzle is a .pac file to use the proxy when connected to the primary connection and go directly out the secondary connection in case the primary connection goes down. I am new to .pac files and have used the ones in the past that call for using a direct connection when the network settings are not detected. This works for my laptop users, the problem I am faced with is these workstaions are always connected to the network so this type of .pac file would not work. So in basic terms I need a .pac file that says if the proxy server is detected or reachable, use it. If not go direct.
0
Comment
Question by:rayosburnjr
2 Comments
 
LVL 3

Accepted Solution

by:
ncollings earned 500 total points
Comment Utility
Function FindProxyForURL(url, host) { return "PROXY proxy.example.com:8080; DIRECT"; }

This will force the browser to try the proxy first and if it is not avaliable then go direct.
0
 
LVL 12

Expert Comment

by:mccracky
Comment Utility
Are you saying your proxy is not on your network?  If it is, I wouldn't worry about the .pac file, but routing out the back end of the proxy.  If your main connection goes down reroute the backend out the other connection.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Envision that you are chipping away at another e-business site with a team of pundit developers and designers. Everything seems, by all accounts, to be going easily.
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to dynamically set the form action using jQuery.

728 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now