Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I need to force one specific HTTP request through a web proxy whereas the rest of the HTTP requests should directly go to the web server.

I can use error code 305 Use Proxy response to redirect my client, but I'm not sure if that would be supported by my client's underlying HTTP stack.

Do any other options exist to accomplish this?

share|improve this question

1 Answer 1

You can use a PAC file to make the browser choose the proxy based on the URL. For example:

function FindProxyForURL(url, host) {
    if (url == 'http://example.com/blah') {
        return 'PROXY cache.example.org:3128;
    }
    return 'DIRECT';
}
share|improve this answer
    
Which of course would not force anything :-) –  guntbert Feb 14 '13 at 21:33
    
@guntbert You can always deny it on the server to prevent incorrectly configured clients from access it directly. –  mgorven Feb 14 '13 at 21:35
    
You are assuming that they have control over the web server? In that case you are right. –  guntbert Feb 14 '13 at 21:43

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.