RewriteCond filter Query String of Post

ISAPI_Rewrite is a powerful URL manipulation engine based on regular expressions
User avatar
Posts: 4
Joined: 22 Aug 2012, 18:20
Location: Brazil - SP

RewriteCond filter Query String of Post

22 Aug 2012, 18:30

Hi,

I know a little about rewrite_mod. I m trying to filter a specific query string from my post and I dont know how.

I got this website /mapviewer/foi and i can track severals post using firebug. The ones that has (MA_VGV) i need to filter.

(*)But i only have success if I directly informe in my browser the URL, like /mapviewer/foi?XXXXXXXX.MA_VGV.

There is some way that REQUEST_STRING read the POST?

(*)
RewriteCond %{QUERY_STRING} (MA_VGV)
RewriteRule ^/mapviewer/foi$ http://other_IP/mapviewer/foi$1 [P]

User avatar
Posts: 871
Joined: 12 Mar 2012, 09:54

Re: RewriteCond filter Query String of Post

23 Aug 2012, 04:06

Hello,

I'm sorry but your explanation is not very clear. Could you please give some specific example of the URL you need to catch and process and how you want it to be processed.

User avatar
Posts: 4
Joined: 22 Aug 2012, 18:20
Location: Brazil - SP

Re: RewriteCond filter Query String of Post

23 Aug 2012, 09:31

Hi,

I need to get that MA_VGV from that post. I doubt is how I do it using mod_rewrite. Can I do this with mod_rewrite or I have to use some other thing?

(EDIT)
I need to redirect this kind of POST.

if MA_VGV go to x
else go to y

Image

xxxz.png
xxxz.png (85.19 KiB) Viewed 4084 times

User avatar
Posts: 4
Joined: 22 Aug 2012, 18:20
Location: Brazil - SP

Re: RewriteCond filter Query String of Post

23 Aug 2012, 15:58

There is a variable of SecRule for get/read the SOURCE of POST? (I dont know if this I can call postpayload).

User avatar
Posts: 871
Joined: 12 Mar 2012, 09:54

Re: RewriteCond filter Query String of Post

28 Aug 2012, 05:06

Hello,

Unfortunately, ISAPI_Rewrite is not capable of retrieving a variable form the POST body. Please try to find another tool for that.

User avatar
Posts: 4
Joined: 22 Aug 2012, 18:20
Location: Brazil - SP

Re: RewriteCond filter Query String of Post

28 Aug 2012, 10:16

HI Anton,
Thanks!

I gave up of trying, now you confirm that :-P. I used a custom header in my code, TRATAR_DATA = True or False, then if it is true will be a redirect request do an onther http server.

RewriteCond %{HTTP:TRATAR_DATA} ^TRUE$
RewriteRule ^/url/site$ http://xxx.xxx.xxx.xxx/url/site$1 [P]

Return to ISAPI_Rewrite 2.x

Who is online

Users browsing this forum: No registered users and 2 guests