RewriteRule-env: setting values containing ","

Discussion in 'Apache' started by zzdub, Jan 29, 2010.

  1. #1
    Hello Apache-pros,

    I´m having some trouble setting the right values for my query-string variable by using the RewriteRule-env syntax:

    I´m using a variable to keep and change the content of the QUERY_STRING parameter. At the very end I do a proxy-redirect with the content in my variable.

    The problem is now: The framework of the proxy-target requires query-strings that contain comma-seperated lists

    e.g.

    http://myhost/path?p=long,query,string,with,commas,23456
    Code (markup):
    To accomplish this I wrote rules of type:

    
    	RewriteCond %{REQUEST_URI} /something-(.*)-(.*) 
    	RewriteRule (.*) - [env=QRY_STR:long,query,string,with,commas,%1] 
    
    Code (markup):
    The Apache won´t start with these configs but I don´t see anything in my error.log. I guess, the commas corrupt the syntax: If I remove them, the Apache starts fine.

    Do you know a way how I can use commas in my env-variable?

    By the way: Using "%2C" doesn´t work, because the %2 will be replaced by the second regexp string.

    Thanks for any help
     
    zzdub, Jan 29, 2010 IP