Forum Discussion
mart_58302
Nimbostratus
Aug 15, 2008Serving wpad.dat with F5?
Hello.
Maybe wrong area, but I'm trying to find out, is it possible to use F5 himself as web server, to serve text based file like wpad.dat or cache.pac for clients?
How ...
mart_58302
Nimbostratus
Oct 20, 2008
With the rule which doesn't check the host or URI (Click here), all requests to the VIP will be answered with the contents:
function FindProxyForURL(url, host) {
if(shExpMatch(host, "*[^0123456789.]*") == false)
if( isInNet\(host, "127.0.0.0", "255.0.0.0")
|| isInNet(host, "172.17.0.0", "255.255.0.0")
|| isInNet(host, "172.18.0.0", "255.255.0.0")
)
return "DIRECT"; \
else
return "PROXY proxygateway.internal:8080; DIRECT";}
Do you want to send the same response content for every request? If so, you can use the linked iRule and you don't need to check the requested host header or URI.
If you do want to send a different response based on either the requested host or URI, then you could use a switch statement or a datagroup with the matchclass command to check the requested host and/or URI.
Can you clarify what you need to implement?
Yes, this is good rule, but I'd like just avoid clients to write in their browsers config anyhing more or less, then just /wpad.dat or /cache.pac in the end, as maybe after some time proxy's will hold the wpad.dat file and then will be troubles, if clients did make some typo in name, as with this iRule it does't matter what there is at all.
So swith without hostcheck?
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
