httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Folini <christian.fol...@post.ch>
Subject Re: [users@httpd] How to compare cookie value to request URL
Date Mon, 05 Nov 2007 07:53:27 GMT
Hey Ursula,

On Wed, Oct 31, 2007 at 01:57:07PM -0700, ursula.schwantag@tektronix.com wrote:
> In the webserver configuration, I need to compare the value of a cookie
> against the request URL. 
> 
> E.g. on a request for /path/to/files/abc.zip, return the file if the
> cookie contains the file name: MYCOOKIE=abc.zip. Otherwise redirect to a
> different page. 

This does not sound very elegant. So you may want to reconsider your
architecture.

> With RewriteCond, I can compare the cookie value to a static value or a
> regular expression, but not to another variable. Is there any way to do
> that? 

If you have to stick with it, I guess you might be able to
solve it with a perl rewrite map. It would not scale very well,
but for a small site which absolutely needs this functionality
you could give it a try.

regs,

Christian


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message