[ ijbswa-Actionsfile feedback-3613238 ] Redirect not working

SourceForge.net <[email protected]>
Newsgroups gmane.comp.web.privoxy.devel
Message-ID <[email protected]>
Actionsfile feedback item #3613238, was opened at 2013-05-13 15:34
Message generated for change (Comment added) made by fabiankeil
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=460288&aid=3613238&group_id=11118

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: filter: other problem
Group: current actionsfile
>Status: Closed
>Resolution: Works For Me
Priority: 5
Private: No
Submitted By: James (smilin-jb)
Assigned to: Fabian Keil (fabiankeil)
Summary: Redirect not working

Initial Comment:
Hi, I'm trying to set up a redirect using privoxy, but am having issues with the regular expression andwondered if anyone could point me in the right direction.

I'm trying to redirect http://www.example.com/webextend/smssend.asp?smsto=00000000000&message=message to https://192.168.212.205/sendsms.php?

I cant get the $_GET info to pass to the new URL. I'm using the following action:

{-fast-redirects \
+redirect{s@^http://[^/]*smssend\.asp\?([^&]*).*@https://192.168.212.205/sendsms.php?$1@}}
.example.com/(.*/)smssend.asp

Where am I going wrong? Can anyone help me?

James

----------------------------------------------------------------------

>Comment By: Fabian Keil (fabiankeil)
Date: 2013-05-14 02:56

Message:
You're welcome. Thanks for reporting back that it's working now.

----------------------------------------------------------------------

Comment By: James (smilin-jb)
Date: 2013-05-14 02:34

Message:
Ah sorry, I made a typo. All working fine now thank you

----------------------------------------------------------------------

Comment By: James (smilin-jb)
Date: 2013-05-14 02:31

Message:
Thank you Fabiankeil for your assistance, I do wish to retain everything
after the ?

----------------------------------------------------------------------

Comment By: James (smilin-jb)
Date: 2013-05-14 02:29

Message:
I made the change to the code you suggested, but it still doesn't redirect.
I have pasted the forwarding settings and  final result of the
show-url-info below

Forwarding settings:

Requests for http://update.example.com/support/webextend/smssend.asp?test
will be made directly, no forwarding settings apply. 

Final results:

+change-x-forwarded-for{block}
+client-header-tagger{css-requests}
+client-header-tagger{image-requests}
+hide-from-header{block}
+redirect{s@^http://.*smssend\.asp\?@https://192.168.212.205/sendsms.php?@}
+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
-filter
-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
-limit-cookie-lifetime
-overwrite-last-modified
-prevent-compression
-server-header-filter
-server-header-tagger
-session-cookies-only

----------------------------------------------------------------------

Comment By: Fabian Keil (fabiankeil)
Date: 2013-05-14 02:17

Message:
Your redirect{} pcrs command doesn't allow slashes between "http://" and
"smssend" and thus the request isn't redirected.

You could try something like:

{+redirect{s@^http://.*smssend\.asp\?@https://192.168.212.205/sendsms.php?@}}
.example.com/.*/smssend.asp

 (I'm assuming everything after the "?" should be kept.)

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=460288&aid=3613238&group_id=11118

------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.