Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm using the Privoxy proxy on my PC.

What is the rewrite rule in the user.action file to rewrite e.g.: http://foo.org to https://foo.org? Note that I want to rewrite, not redirect.

So if I search google for foo.org then on the search page there would be https://foo.org.

Would the rewrite work on e.g.: https://encrypted.google.com/?

Or is redirecting better because there could be e.g.: <img src="foo.org/pic.jpg"></img>?

share|improve this question
    
You may also want to consider (instead) using this on your clients: eff.org/https-everywhere –  mattdm Mar 14 '11 at 19:10
add comment

1 Answer

up vote 3 down vote accepted

The reason why you need to redirect that URL rather than rewrite is because you are visiting an unencrypted web page with the http:// (plaintext) URL, and the proxy needs to tell the browser to talk to the https:// URL. If the connection was simply redirected at the SSL port, your browser wouldn't know what to do with an SSL response if it were somehow directed to the secure port using the HTTP protocol. (Sadly, I'm not sure if anyone uses http-starttls, which should be able to handle that, but that's a separate question)

By using a redirect, the proxy uses HTTP return codes to tell the browser to open a new connection, using HTTPS instead of HTTP.

share|improve this answer
    
So the safest method would be the redirect: pastebin.mozilla.org/1164461 ? [in the user.action] ok! Thank you!! –  LanceBaynes Mar 15 '11 at 10:12
add comment

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.