PAC file not working with Internet Explorer

Posted on 2011-10-23
Last Modified: 2012-08-13
Hi, I am trying to get a .PAC file working in our environment, but I cannot get it work at all in Internet Explorer. It is suppose to be pointing onLAN to Telstra's MessageLabs proxy and offLAN direct. I have tried Internet Explorer 6,7,8 and 9, and all fail to work. However, I have tried the PAC file in firefox and it works correctly. The Pac file is sitting in the c: drive at the moment and I reference it by "file:///c:/proxy.pac". I have also tried the basic "c:\proxy.pac" to no success. I have checked that there is nothing being pushed out by Group Policy that should affect it, but I am sure which settings could interfere with a PAC file this way. But to be sure I have tried on both machines on and off our network. Below is the copy of the script I have used;

function FindProxyForURL(url, host)
if (isInNet(myIpAddress(), "", ""))
return "PROXY";
return "DIRECT";

The PAC file itself works well in firefox, but does not seem to be referenced at all in Internet Explorer. Any ideas or suggestions would be greatly appreciated as i am running out of ideas as to why it is not working.

Kind Regards,
Question by:NWRH ICT
    LVL 13

    Accepted Solution

    hello Josh.
    This link contains what you need to know about pac files and how to use them. . maybe silly but try this one
    function FindProxyForURL(url, host)
    if (isInNet(myIpAddress(), "", "")) return "PROXY";
    return "DIRECT";

    please feedback

    Author Closing Comment

    by:NWRH ICT
    Hi Stergium,

    This worked a treat. I also had to change my script path to file://c:/proxy.pac.
    Thanks very much.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Lync meeting or Lync conferencing is what many organizations would like to deploy to allow them save money. But companies are now giving up for various reasons, one of which is that they cannot join external meetings (non-federated company meetings)…
    SSL stands for “Secure Sockets Layer” and an SSL certificate is a critical component to keeping your website safe, secured, and compliant. Any ecommerce website must have an SSL certificate to ensure the safe handling of sensitive information like…
    The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
    Google currently has a new report that is in beta and coming soon to Webmaster Tool accounts. This Micro Tutorial will highlight new features for Google Webmaster Tools.

    759 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

    10 Experts available now in Live!

    Get 1:1 Help Now