Re: [us...@httpd] handling parameter in query_string with mod_rewrite

2010-02-17 Thread Stefano Nichele
Hi Igor, maybe my issue was not fully clear but your suggestion puts me on the right way thanks a lot !! What I'm using now (and it seems working) is: RewriteEngine on RewriteCond %{QUERY_STRING} ^(.*)[\&|\?]*filename=([\w|\d|\.|\%| ]*)[\&]*(.*)$ RewriteRule .* - [E=FILEN

Re: [us...@httpd] handling parameter in query_string with mod_rewrite

2010-02-16 Thread Igor Cicimov
Sorry this should have been like this actually RewriteEngine On RewriteCond %{QUERY_STRING} ^filename=(myfile.txt)$ RewriteRule .* - [E=FILENAME:%1] to set the FILENAME variable to myfile.txt value. Igor On Wed, Feb 17, 2010 at 10:30 AM, Igor Cicimov wrote: > RewriteRule doesn't work with

Re: [us...@httpd] handling parameter in query_string with mod_rewrite

2010-02-16 Thread Igor Cicimov
RewriteRule doesn't work with the query part or the URI thus will not work in your case. You need to try RewriteCond directive combined with RewriteRule. Something like this maybe? RewriteEngine On RewriteCond %{QUERY_STRING} ^(filename=myfile.txt)$ RewriteRule .* - [E=FILENAME:%1] Header set "

[us...@httpd] handling parameter in query_string with mod_rewrite

2010-02-16 Thread Stefano Nichele
Hi All, I would need some help with mod_rewrite :-( . What I would need is to add an header to the response if the request contains a URL parameter and the value of that parameter should be used in that header. Just to clarify, if the url is: /download/files/1ytreefecsw?filename=myfile.txt