Menu

#1698 Redirect should step in before DNS request.

3.0.21
pending
redirect (1)
5
2016-03-21
2015-09-28
dindog
No

Say that a webstie changes its domain, then all the "old links" became failed in DNS request. USER can't help user rederct thoes "old links" to the new domain because if will stop at DNS failure.

And I see Privoxy using 302 to redirect a request to another URL, there are another redirect which transparent to client ( URL will be the same, just forward to the new URL ), can Privoxy do that?

Discussion

  •  dindog

    dindog - 2015-09-28

    Sorry, I mean, "Privoxy can't help user redirect those "old links" tothe new domain... typo

     
  • Fabian Keil

    Fabian Keil - 2015-09-28

    I'm not sure I understand the issue.

    If you configure Privoxy to redirect requests to a certain domain,
    Privoxy is expected to issue the redirect without trying to resolve
    the domain.

    If the request is redirected to a domain that properly resolves
    (or to a plain IP address), everything should be working.

    If it doesn't, please reproduce the problem and provide a log excerpt
    that shows the issue.

    While Privoxy can also rewrite the request destination behind the client's
    back, this should not be necessary just to deal with DNS issues:
    http://config.privoxy.org/user-manual/actions-file.html#CLIENT-HEADER-FILTER
    http://jvauzb4sb3bwlsnc.onion/user-manual/actions-file.html#CLIENT-HEADER-FILTER

     
    •  dindog

      dindog - 2015-09-28

      Try this,
      {+redirect{http://www.google.com}}
      www.fooisfoobarbar.com

      Privoxy won't redirect if you trying to open www.fooisfoobarbar.com , only 404 error page. Make sure that is a non-existent domain at you dns.

       
      • Fabian Keil

        Fabian Keil - 2015-09-28

        Please provide the log excerpt that shows that the request is actually reaching Privoxy.

        Your example works for me as expected (but Sourceforge will probably mess up the output below):

        fk@r500 ~ $curl -v http://www.fooisfoobarbar.com/
        STATE: INIT => CONNECT handle 0x802087000; line 1090 (connection #-5000)
        Added connection 0. The cache now contains 1 members
        Trying 127.0.1.1...
        STATE: CONNECT => WAITCONNECT handle 0x802087000; line 1143 (connection #0)
        Connected to 127.0.1.1 (127.0.1.1) port 8118 (#0)
        STATE: WAITCONNECT => SENDPROTOCONNECT handle 0x802087000; line 1240 (connection #0)
        * STATE: SENDPROTOCONNECT => DO handle 0x802087000; line 1258 (connection #0)

        GET http://www.fooisfoobarbar.com/ HTTP/1.1
        Host: www.fooisfoobarbar.com
        User-Agent: curl/7.44.0
        Accept: /
        Proxy-Connection: Keep-Alive

        • STATE: DO => DO_DONE handle 0x802087000; line 1337 (connection #0)
        • STATE: DO_DONE => WAITPERFORM handle 0x802087000; line 1464 (connection #0)
        • STATE: WAITPERFORM => PERFORM handle 0x802087000; line 1474 (connection #0)
        • HTTP 1.1 or later with persistent connection, pipelining supported
          < HTTP/1.1 302 Local Redirect from Privoxy
          < Location: http://www.google.com
          < Content-Length: 0
          < Date: Mon, 28 Sep 2015 14:00:13 GMT
          <
        • STATE: PERFORM => DONE handle 0x802087000; line 1632 (connection #0)
        • Curl_done
        • Connection #0 to host 127.0.1.1 left intact
        • Expire cleared
         
  •  dindog

    dindog - 2015-09-28

    well, it works now... strange. So it's an invalid report about the {+redirect }, as for the other part, I don't understand how http header modify will make a transparent redirect...

    A transparent forward is transparent to client, the client won't aware the changed because the URL will remain the same. And 302 redirect will explicitly redirect the request... Can privoxy do transparent one?

     

    Last edit: dindog 2015-09-28
  • Fabian Keil

    Fabian Keil - 2016-03-21
    • status: open --> pending
    • assigned_to: Fabian Keil
     
  • Fabian Keil

    Fabian Keil - 2016-03-21

    Somehow I missed the notification for your last question.

    If you rewrite the URL with a client-header this will be transparent to the client:
    http://config.privoxy.org/user-manual/actions-file.html#CLIENT-HEADER-FILTER

     

Log in to post a comment.