Link to home
Start Free TrialLog in
Avatar of Phil Pearce
Phil PearceFlag for United Kingdom of Great Britain and Northern Ireland

asked on

PAC File - Bypass proxy server for local addresses

Hi,
Ive got a pac file done which looked like this (example a) what Im trying to get is a pac file that bypasses local addresses.  Any ideas on how this can be done. Ive tried (example b) but does anyone know if this is the right way?

Thanks
example a)
function
	FindProxyForURL(URL,host)
	{
	return "PROXY 10.4.2.28:80;PROXY 10.4.2.29:80";
	}
 
example b)
function FindProxyForURL(url, host)
{
if (shExpMatch(url, "*.internaldomainname.co.uk")) 
return DIRECT;
else
return "PROXY 10.4.2.29:80;PROXY 10.4.2.28:80";
}

Open in new window

Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Try

if (url.indexOf("internaldomainname.co.uk") > -1)

regex might be problematical in some cases
ASKER CERTIFIED SOLUTION
Avatar of Phil Pearce
Phil Pearce
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial