FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 03-20-2011, 02:56 PM
johhny_at_poland77
 
Default Privoxy redirect rule for Wikipedia! :)

Dear community!
I have a few Privoxy rules, that can redirect HTTP Wikipedia [en,de] traffic to HTTPS:*(a little part from the "user.action" file
{ +redirect{s@http://en.wikipedia.org/wiki/@https://secure.wikimedia.org/wikipedia/en/wiki/@} }.en.wikipedia.org
{ +redirect{s@http://de.wikipedia.org/wiki/@https://secure.wikimedia.org/wikipedia/de/wiki/@} }.de.wikipedia.org
..so you get the problem: is there any way to put a "regexp" or something to: "en", "de"?There are hundreds of other languages, i think it's a bad solution to write down them all.
There is another question: is my solution good so far?I'm asking that because if i visit:*
https://secure.wikimedia.org/wikipedia/en/wiki/File:Nokota_Horses_cropped.jpgthat's ok, it's using HTTPS. BUT if i click on the picture:*
http://upload.wikimedia.org/wikipedia/commons/d/de/Nokota_Horses_cropped.jpgit's using _HTTP_ !!! - so this is not good. Are the pictures on a HTTP-only server,*or i can write another redirect rule to view the pictures in HTTPS?
Thanks you for any pointings, help, solution.--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 03-20-2011, 02:56 PM
johhny_at_poland77
 
Default Privoxy redirect rule for Wikipedia! :)

Dear community!
I have a few Privoxy rules, that can redirect HTTP Wikipedia [en,de] traffic to HTTPS:*(a little part from the "user.action" file
{ +redirect{s@http://en.wikipedia.org/wiki/@https://secure.wikimedia.org/wikipedia/en/wiki/@} }.en.wikipedia.org
{ +redirect{s@http://de.wikipedia.org/wiki/@https://secure.wikimedia.org/wikipedia/de/wiki/@} }.de.wikipedia.org
..so you get the problem: is there any way to put a "regexp" or something to: "en", "de"?There are hundreds of other languages, i think it's a bad solution to write down them all.
There is another question: is my solution good so far?I'm asking that because if i visit:*
https://secure.wikimedia.org/wikipedia/en/wiki/File:Nokota_Horses_cropped.jpgthat's ok, it's using HTTPS. BUT if i click on the picture:*
http://upload.wikimedia.org/wikipedia/commons/d/de/Nokota_Horses_cropped.jpgit's using _HTTP_ !!! - so this is not good. Are the pictures on a HTTP-only server,*or i can write another redirect rule to view the pictures in HTTPS?
Thanks you for any pointings, help, solution.--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 03-20-2011, 05:16 PM
Jacob Mansfield
 
Default Privoxy redirect rule for Wikipedia! :)

looks line the pictures are on an HTTP only serverJacob Mansfield
Programmer
CyberKing Solutions™
www.cyberkingsolutions.co.uk - I do know the database is down



"When Windows™ is opened the bugs come in."
Please avoid sending me Word or PowerPoint attachments.
See*http://www.gnu.org/philosophy/no-word-attachments.html



-----BEGIN GEEK CODE BLOCK-----
Version: 3.1-Jacob1
GCM/CS/CC/E/ED/MC/S/AT/! d++(---) s-: a--->? C++++ UL$++(++++)>$ P(+)*
L$+++(++++)>$ E(?) W+++$ N(?)>+ o k(+/++) w---()>$ O? M(+)>$ V? PS(+) PE Y(+)


PGP(+/++) t(+) 5?>+ X+ R(?) tv+ b++(+++) DI(+) D G(++) e-(*) h!-- !r y(--)>+++++$
------END GEEK CODE BLOCK------



On 20 March 2011 15:56, johhny_at_poland77 <johhny_at_poland77@zoho.com> wrote:


Dear community!


I have a few Privoxy rules, that can redirect HTTP Wikipedia [en,de] traffic to HTTPS:*(a little part from the "user.action" file


{ +redirect{s@http://en.wikipedia.org/wiki/@https://secure.wikimedia.org/wikipedia/en/wiki/@} }

.en.wikipedia.org


{ +redirect{s@http://de.wikipedia.org/wiki/@https://secure.wikimedia.org/wikipedia/de/wiki/@} }

.de.wikipedia.org


..so you get the problem: is there any way to put a "regexp" or something to: "en", "de"?

There are hundreds of other languages, i think it's a bad solution to write down them all.


There is another question: is my solution good so far?I'm asking that because if i visit:*


https://secure.wikimedia.org/wikipedia/en/wiki/File:Nokota_Horses_cropped.jpg

that's ok, it's using HTTPS. BUT if i click on the picture:*


http://upload.wikimedia.org/wikipedia/commons/d/de/Nokota_Horses_cropped.jpg

it's using _HTTP_ !!! - so this is not good. Are the pictures on a HTTP-only server,*or i can write another redirect rule to view the pictures in HTTPS?


Thanks you for any pointings, help, solution.


--

ubuntu-users mailing list

ubuntu-users@lists.ubuntu.com

Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users




--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 03-20-2011, 11:29 PM
Suvayu Ali
 
Default Privoxy redirect rule for Wikipedia! :)

On Sun, 20 Mar 2011 08:56:06 -0700
johhny_at_poland77 <johhny_at_poland77@zoho.com> wrote:

> { +redirect{s@http://de.wikipedia.org/wiki/@https://secure.wikimedia.org/wikipedia/de/wiki/@} }
> .de.wikipedia.org
>
>
> ..so you get the problem: is there any way to put a "regexp" or
> something to: "en", "de"? There are hundreds of other languages, i
> think it's a bad solution to write down them all.

I have never used privoxy so I don't know what kind of regexp is
supported but does the following work?

s@http://([a-z]{2}).wikipedia.org/wiki/@https://secure.wikimedia.org/wikipedia/1/wiki/@

You might need to change some of the quoting. Above I have only quoted
the parentheses and braces.

How the above should work:
([a-z]{2}) - this matches any two consecutive letters between a-z
1 - this is replaces with whatever was matched within the parentheses

Hope this helps.

--
Suvayu

Open source is the future. It sets us free.
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 

Thread Tools




All times are GMT. The time now is 02:46 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org