I have some strings.
127.0.0.1:46977/safekids/permission_denied.html
domain1.com/denied/permission_safekid.html
domain2.eu/pkb/1144/niche/denied/permission_safekid.html
192.168.1.6:46977/14/asp/var/denied/permission_kid.html
And I have a pac file.
function FindProxyForURL(url, host)
{
// variable strings to return
var proxy_yes = "myproxy:3128";
var proxy_no = "DIRECT";
if (shExpMatch(url, "*safekid*")) { return proxy_yes; }
if (shExpMatch(url, "*denied*")) { return proxy_yes; }
if (shExpMatch(url, "*block*")) { return proxy_yes; }
else
return "DIRECT";
}
What I want here is to use proxy if a url contains one of the following words: safekid,denied,block
But while using pac file I am not able to enable proxy if word occurs after slashes. /
It is actually working if keyword found before slash like example given below
block.blala.com
hello.safekid.com
denied.proxy.me
But it is not working if I use
myurl.com/safekid
so if keyword occured after slashed / it won't work don't know why
I hope anyone can help with this. I guess can we use regex here?