fetching url through api while rewrite rule in effect

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • soniamuk
    New Member
    • Jun 2007
    • 1

    #1

    fetching url through api while rewrite rule in effect

    i am facing a typical issue with apache where i have a filter context(written in c++) which pulls information from apache server. in this process when i am trying to fetch an url where rewrite rule of apache is in picture the fethced value is not correct.

    say the rule i am using in rewrite.conf is

    RewriteRule ^/ows/printenv$ http://10.152.70.206:9 999/cgi-bin/printenv.pl?map =public.map [L,P,QSA]

    what is seen is if i access ^/ows/printenv apache is sending map=public.map as query string but if i acess /ows/printenv ?xyz=abc it only sends xyz=abc as query string (eliminating the original map=public.map )

    but if my context is not in picture and apache is used alone the query string for second request is correctly map=public.map &xyz=abc


    please let me know what might be wrong in the context i have written as for every other case it behaves alright
  • Motoma
    Recognized Expert Specialist
    • Jan 2007
    • 3236

    #2
    Originally posted by soniamuk
    i am facing a typical issue with apache where i have a filter context(written in c++) which pulls information from apache server. in this process when i am trying to fetch an url where rewrite rule of apache is in picture the fethced value is not correct.

    say the rule i am using in rewrite.conf is

    RewriteRule ^/ows/printenv$ http://10.152.70.206:9999/cgi-bin/pr...map=public.map [L,P,QSA]

    what is seen is if i access ^/ows/printenv apache is sending map=public.map as query string but if i acess /ows/printenv ?xyz=abc it only sends xyz=abc as query string (eliminating the original map=public.map )

    but if my context is not in picture and apache is used alone the query string for second request is correctly map=public.map &xyz=abc


    please let me know what might be wrong in the context i have written as for every other case it behaves alright
    Try this:
    RewriteRule ^/ows/printenv$ http://10.152.70.206:9999/cgi-bin/pr...map=public.map [L,P,QSA]
    RewriteRule ^/ows/printenv&([^.]+)$ http://10.152.70.206:9 999/cgi-bin/printenv.pl?map =public.map&$1 [L,P,QSA]

    Comment

    Working...