Redirect http to https of the same domain.
|
Aug. 12, 2018, 11:36 AM
Post: #1
|
|||
|
|||
Redirect http to https of the same domain.
Hello! Here's a filter that does not work:
Code: { +redirect{s@^http://@https://@} } More precisely, the browser says that "incorrect redirection on the page." In the console, you can see that the redirect happens several times on the same page. I sort of understand the problem, I got some kind of fixated redirect, but I do not understand how to solve it. Using rewrite and the client-header-filter in. From help's Privoxy I do not really understand how to do it. |
|||
Mar. 17, 2019, 08:26 PM
(This post was last modified: Mar. 17, 2019 08:30 PM by vlad_s.)
Post: #2
|
|||
|
|||
RE: Redirect http to https of the same domain.
Due to the operation of ProxHTTPSProxyMII, the redirects action cannot be performed. It turns out an endless redirect. For example http://example.com to https://example.com. If you redirect to another site, then there is no problem, http://example.com to https://example2.com. How can you solve this problem? You can try to make filters for Privoxy, but I acted differently. On top of that, I use a squid proxy server, he also knows how to redirect. Add the following lines to its config:
Code: acl PORT80 localport 80 ![]() |
|||
Mar. 19, 2019, 03:34 AM
Post: #3
|
|||
|
|||
RE: Redirect http to https of the same domain.
ProxHTTPSProxyMII's front server adds the request header
Code: Tagged:ProxHTTPSProxyMII FrontProxy/ So "Tagged" requests are HTTPS requests. To avoid the loop, Privoxy must not redirect request that contain the "Tagged" header. At https://www.privoxy.org/user-manual/actions-file.html , I see Quote:8.4.4. The Negative Request Tag Patterns I would try adding a "NO-REQUEST-TAG:" command for Tagged:ProxHTTPSProxyMII FrontProxy/ to the filter. I will leave the syntax to others. HTH |
|||
![]() vlad_s |
Mar. 19, 2019, 08:42 PM
Post: #4
|
|||
|
|||
RE: Redirect http to https of the same domain.
Not quite clear how to do this? Filters sequence and actions?
|
|||
Mar. 21, 2019, 03:35 AM
Post: #5
|
|||
|
|||
RE: Redirect http to https of the same domain.
(Mar. 19, 2019 08:42 PM)vlad_s Wrote: Not quite clear how to do this? Me too. You have been warned. ![]() After installing Privoxy 3.0.28, I added Code: { +redirect{s@^http://[email protected]://prxbx.com@} } to the end of user.action. I think it works? There is no loop and Privoxy's log showed: Quote:2019-03-20 20:59:10.546 00002cd8 Header: scan: GET http://prxbx.com/download/ HTTP/1.1 Code: { +redirect{s@^http://@https://@} } also works for me but will redirect sites that don't support https. Quote:2019-03-20 22:15:04.198 00002118 Header: scan: GET http://prxbx.com/download/ HTTP/1.1 HTH |
|||
Mar. 25, 2019, 04:47 PM
Post: #6
|
|||
|
|||
RE: Redirect http to https of the same domain.
Yes, it works, but in my example only with sites specified in the file /etc/squid/redirect, i.e. better selectively.
|
|||
Jun. 08, 2019, 07:58 PM
Post: #7
|
|||
|
|||
RE: Redirect http to https of the same domain.
The construction doesn't really work, example:
Code: { +redirect{s@^http://[email protected]://nnmclub.to@} } Code: 2019-06-08 22:53:39.193 7fa0e2ffd700 Redirect: pcrs command "s@^http://[email protected]://nnmclub.to@" didn't change "http://bt4.rutracker.cc/ann?pk=xxx". |
|||
« Next Oldest | Next Newest »
|