Menu

#1482 Redirection to Safe Search

3.0.17
closed
5
2012-03-27
2012-03-19
No

I want to redirect all my searches (that contais &q= or ?q=) to the same address, but appending &safe=strict

I'v tryed this, but didn't work:

{+redirect{s@[^(\?|&)q=]*(\?|&)q=.*@$1$2$3&safe=strict@}}
google.com

Can you help me, please.

Thanks, Ariel

Discussion

1 2 > >> (Page 1 of 2)
  • Fabian Keil

    Fabian Keil - 2012-03-19
    • assigned_to: nobody --> fabiankeil
    • status: open --> pending
     
  • Ariel Laniado

    Ariel Laniado - 2012-03-19
    • status: pending --> open
     
  • Ariel Laniado

    Ariel Laniado - 2012-03-19

    Hi Fabian.

    Thanks for your help. I tested your solution, but it doesn't redirect.
    I have setted the debug to 128 and it doesn't shows me anything.

    There is any configuratio I have to enable to the redirections work.

    Thanks, Ariel

     
  • Fabian Keil

    Fabian Keil - 2012-03-20

    Do you see the action in the final results if you visit "http://config.privoxy.org/show-url-info?url=http%3A%2F%2Fwww.google.com%2Fbla%3Fq%3Dfasel"?

    If you do, please enable the debug directives recommended at
    http://www.privoxy.org/user-manual/contact.html#CONTACT-BUGS
    and attach a log excerpt for a request to that URL.

     
  • Fabian Keil

    Fabian Keil - 2012-03-20
    • status: open --> pending
     
  • Ariel Laniado

    Ariel Laniado - 2012-03-20

    Thanks again Fabian.

    That worked perfect. But actually my searches uses: http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=fasel

    And this url is not redirected. There is any change I must do?

    Thanks, Ariel

     
  • Ariel Laniado

    Ariel Laniado - 2012-03-20
    • status: pending --> open
     
  • Fabian Keil

    Fabian Keil - 2012-03-21
    • status: open --> pending
     
  • Fabian Keil

    Fabian Keil - 2012-03-21

    The URL is already supposed to be covered and redirected. So ...

    Do you see the redirect action in the final results if you visit
    "http://config.privoxy.org/show-url-info?url=http%3A%2F%2Fwww.google.com%2Fsearch%3Fsourceid%3Dchrome%26ie%3DUTF-8%26q%3Dfasel"?

    If you do, please enable the debug directives recommended at
    http://www.privoxy.org/user-manual/contact.html#CONTACT-BUGS
    and attach a log excerpt for a request to that URL.

     
  • Ariel Laniado

    Ariel Laniado - 2012-03-21

    Hi Again Fabian.

    It doesn't filter my request (and I don't get the redirect action).

    What do you think is wrong with the redirection?

    Thanks again, Ariel

     
  • Ariel Laniado

    Ariel Laniado - 2012-03-21
    • status: pending --> open
     
  • Fabian Keil

    Fabian Keil - 2012-03-22

    Do you see the redirect action in if you visit
    "http://config.privoxy.org/show-url-info?url=http%3A%2F%2Fwww.google.com%2Fsearch%3Fsourceid%3Dchrome%26ie%3DUTF-8%26q%3Dfasel"
    at all?

    If you copied the provided sections without modifying them, the redirect{} should be at least applied to both
    http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=fasel
    and
    http://www.google.com/bla?q=fasel

    If "+redirect{s@$@&safe=strict@}" is not in the final results for the first URL, you may be unintentionally overruling the section later on with an older section.

    If you follow the "Matches" it should be clear if that's the case. If it isn't, please post both the "Matches" and the "Final results".

     
  • Fabian Keil

    Fabian Keil - 2012-03-22
    • status: open --> pending
     
  • Ariel Laniado

    Ariel Laniado - 2012-03-22
    • status: pending --> open
     
  • Ariel Laniado

    Ariel Laniado - 2012-03-22

    Matches for http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=fasel:
    In file: match-all.action View
    {+change-x-forwarded-for{block}
    +client-header-tagger{css-requests}
    +client-header-tagger{image-requests}
    +hide-from-header{block}
    +set-image-blocker{pattern} }
    /
    In file: default.action View
    {-fast-redirects }
    .google.*
    {-filter{img-reorder} }
    .google.
    In file: user.action View
    {-filter{parental-english-other} }
    /
    {-filter{parental-english-porn}
    -filter{parental-portuguese-porn}
    -filter{parental-spanish-porn}
    -filter{parental-other-eng-spa-porn}
    -filter{parental-english-other} }
    .google.
    {+filter{parental-scoreinit} }
    /
    {+filter{parental-scorekills} }
    /
    {+filter{parental-scorehits} }
    /
    {+filter{parental-kill-normal} }
    /
    {-filter{parental-kill-debug} }
    /
    {-filter{parental-highlight} }
    /
    In file: config/kosherInternetUnfilteredSites.action View
    (no matches in this file)
    In file: config/temporalUnfilteredSites.action View
    {-filter{crude-parental} }
    .google.com
    In file: sa-blacklist.current.action View
    (no matches in this file)
    In file: Squidguard1.action View
    (no matches in this file)
    In file: Squidguard2.action View
    (no matches in this file)

    Final results:

    +change-x-forwarded-for{block}
    +client-header-tagger{css-requests}
    +client-header-tagger{image-requests}
    +filter{parental-scoreinit}
    +filter{parental-scorekills}
    +filter{parental-scorehits}
    +filter{parental-kill-normal}
    +hide-from-header{block}
    +set-image-blocker{pattern}

    -add-header
    -block
    -client-header-filter
    -content-type-overwrite
    -crunch-client-header
    -crunch-if-none-match
    -crunch-incoming-cookies
    -crunch-outgoing-cookies
    -crunch-server-header
    -deanimate-gifs
    -downgrade-http-version
    -fast-redirects
    -force-text-mode
    -forward-override
    -handle-as-empty-document
    -handle-as-image
    -hide-accept-language
    -hide-content-disposition
    -hide-if-modified-since
    -hide-referrer
    -hide-user-agent
    -limit-connect
    -overwrite-last-modified
    -prevent-compression
    -redirect
    -server-header-filter
    -server-header-tagger
    -session-cookies-only

     
  • Fabian Keil

    Fabian Keil - 2012-03-22
    • status: open --> pending
     
  • Ariel Laniado

    Ariel Laniado - 2012-03-27

    Hi Fabian.

    It was my mistake. It works perfect.

    Just a final question. How can I change the redirection to support http://www.google.co.uk and http://www.google.com.ar too?

    Thanks, Ariel

     
  • Ariel Laniado

    Ariel Laniado - 2012-03-27
    • status: pending --> open
     
  • Fabian Keil

    Fabian Keil - 2012-03-27

    I'm pleased to hear that.

    You can simply copy the URL pattern and replace the top-level domain.

    For example copy ".google.com/.*[&?]q=" and change it to ".google.co.uk/.*[&?]q=".

    Alternatively you could change it to ".google./.*[&?]q=" instead, which would cover all domains that contain ".google." somewhere (might include URLs that aren't actually operated by Google).

    For details please have a look at: http://www.privoxy.org/user-manual/actions-file.html#AEN2998

     
  • Fabian Keil

    Fabian Keil - 2012-03-27
    • status: open --> pending
     
  • Ariel Laniado

    Ariel Laniado - 2012-03-27

    Perfect!, worked fine.

    Thanks a lot!

     
  • Ariel Laniado

    Ariel Laniado - 2012-03-27
    • status: pending --> open
     
  • Fabian Keil

    Fabian Keil - 2012-03-27

    You're welcome. Thanks for the confirmation.

     
1 2 > >> (Page 1 of 2)

Log in to post a comment.